开发者

Windows workflow 4.0 InstancePersistenceCommand Error

I have a wcf workflow that have three receive activities arranged in a sequential manner. i.e

1.receive application 2. Manager1 approval 3. final manager approval my problem is that i am able to consume the workflow from my client application and call the first (receive application activity), however when i try to call the second (manager1 approval receive activity) i get the following error

The execution of an InstancePersistenceCommand was interrupted because the instance '16c3dae0-92f5-45e8-bdaf-d6f4051a0a39' has not yet been persisted to the instance store.

I have check开发者_如何学JAVA the database (instance store table) and the record seems to exist. i have also setup Correlation as specified in this article Please help, this is urgent


I finally figured out what was the problem. It has taken me three days.

I just needed to add the following:

<serviceBehaviors>
  <behavior>
    <workflowIdle timeToUnload="0"/>
  </behavior>
</serviceBehaviors>

You can get more details at this article.

NB: My workflow was getting the default timeToUnload value of 1 minute (from the machine config). Meaning when I called the next receive activity in my workflow, the workflow was still in memory. (really strange)


Is the GUID the correct one? Sometimes the WF4 runtime will generate a new GUID if it can't find an existing one leading to some confusing error messages. Also changing namespaces brakes the correlation queries. So if you did that you need to recreate them, or go into the XAML, and fix them.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜