我正在使用BizTalk 2013 R2。我有一个调用,我正在调用助手类来调用Web服务(用于较低的延迟)。该类是Serializable类。业务流程建立成功。当我从POSTMan测试解决方案时,它工作正常。BizTalk 2013 R2 XLANG - 将状态持久保存到数据库时发生异常
但是,对于每一次成功的回应,我也会在事件日志中看到异常。
xlang/s engine event log entry: An unrecoverable exception (see the 'inner exception' below) has occurred.
Service Name: Orchestration Name
Service Id: df34c579-a9e6-5696-e322-b80210d1f723
Instance Id: 0512ae45-c89c-4ffc-9bd2-332b854d4965
An exception occurred when persisting state to the database.
Exception type: PersistenceException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: Void Commit()
The following is a stack trace that identifies the location where the
exception occurred
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.Commit()
at
Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.ScheduleComplete(Boolean terminate)
at Microsoft.XLANGs.Core.Service.Persist(Boolean dehydrate, Context ctx, Boolean idleRequired, Boolean finalPersist, Boolean bypassCommit, Boolean terminate)
at Microsoft.XLANGs.Core.ServiceContext.OnCommit()
at "OrchestrationInstanceName".segment0(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
Additional error information:
A batch item failed persistence Item-ID 9b508582-438f-442d-a320-3ff7d9dd87ed OperationType MAIO_CommitBatch Status -1061151938 ErrorInfo A database failure occurred due to an unexpected failure. .
Exception type: PersistenceItemException
有数据库错误伴随着这个持久性错误。
下面的存储过程调用失败:“{调用[DBO] [bts_UpdateMsgbox_XXXXXX](,,,,,,,,,,,,,。????????????? ?,?,?,?,?,?,?,?)}“。 SQL Server返回错误字符串:“警告:由于使用了本地连接提示,因此已强制执行连接顺序;警告:由于使用了本地连接提示,因此已强制执行连接顺序;重复项被忽略。”
我添加了system.diagnostics.trace
形状调用.net帮助类。然后我注意到编排在第一次运行时运行了两次,它引发了Xlang - Persistence错误和数据库 - “忽略了重复键”错误,然后编排第二次运行,并且它成功地用响应完成。
很明显,我的业务流程运行两次。然后我在形状调用助手类中添加了范围。范围的交易类型是“无”。
然后解决了Xlang持久性错误问题。
为什么我需要在调用中加入额外的范围才能使这项工作没有错误?
这是一个反复出现的问题吗?是否所有的SQL作业都已启用并正常运行? –
@ Johns-305这是一个一直存在的问题,直到我们在调用Orchestration中的外部程序集时调用额外的作用域。是的,环境没有其他问题。 – Dijkgraaf
被调用的Web服务的重试策略是什么? https://msdn.microsoft.com/en-us/library/aa480191.aspx –