我有一个WF4工作流程,具有多个接收功能。启用持久性后,WF4中的多个接收活动失败
工作流程运行良好,直到我添加持久性。我创建了持久性表,增加了以下的\配置\ system.serviceModel \我的web.config的行为\ serviceBehaviors部分:
<behavior>
<!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
<serviceMetadata httpGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="true" />
<sqlWorkflowInstanceStore connectionStringName="InstanceStore"
instanceCompletionAction="DeleteAll"
instanceLockedExceptionAction= "NoRetry"
instanceEncodingOption="None"
hostLockRenewalPeriod="00:01:00"
/>
</behavior>
工作流程接受一个参数是一个WorkflowInstanceDTO POCO我有一个实例定义。
当我运行下面的代码
var wfi = new WFService.WorkflowInstanceDTO()
{
Id = 1,
InstanceId = new Guid(),
Description = "Awesome WFI",
WorkflowId = 1
};
proxy.Create(wfi);
它无法与以下错误proxy.Create线的工作流。
'11e5cf14-c2a8-0fbf-d3b5-c12a91c174ff' 的值的实例中关键 已经存在。这可能是因为定义了多个 MessageQuerySets,其计算结果与相同的CorrelationKey相同。
当持久性未启用时,我不会收到此错误。有没有人看过这个?我究竟做错了什么?