【发布时间】:2010-12-13 23:55:19
【问题描述】:
我有一个带有多个接收功能的 WF4 工作流程。
在我添加持久性之前,工作流程运行良好。我创建了持久性表并将以下内容添加到我的 web.config 的 \configuration\system.serviceModel\behaviors\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);
在代理上失败。创建行并出现以下错误。
值为“11e5cf14-c2a8-0fbf-d3b5-c12a91c174ff”的实例键 已经存在。这可能是因为有多个 定义为相同 CorrelationKey 的 MessageQuerySets。
未启用持久性时,我没有收到此错误。有人见过这个吗?我做错了什么?
【问题讨论】:
标签: workflow persistence workflow-foundation-4