开发者

Windows Workflow 4, persistence, and Data Services

开发者 https://www.devze.com 2023-01-17 17:07 出处:网络
So I\'m starting to work with the new workflow enginge (Windows Workflow Foundation 4 - WF 4) after previously working with 3.5.And I must say it is greatly improved!However, now I am trying to port o

So I'm starting to work with the new workflow enginge (Windows Workflow Foundation 4 - WF 4) after previously working with 3.5. And I must say it is greatly improved! However, now I am trying to port over some existing workflows to WF 4 and have ran into some snags (as is always the case).

So my main problem is that in WF 3, it was all interface based and the workflow runtime was responsible for "linking" interfaces and implentations on the application start and the workflows themselves never had an instance of an object when it serialized itself to the database, which is exactly what I want because I never want my data services to be serialized.

Now in WF 4, I seems like I need to pass the data services as an argument to the workflow, so when it gets persisted to the database, it serializes the variables as well. These are long running workflows that have approval steps and such, so I need to persist the workflow when idle.

Am I missing something, maybe开发者_Go百科 thinking in the old WF 3 mentaility? Or is there a pattern I can use to do this?


In WF4 workflow or activity extensions are the replacement for WF3 sercices. You can add them in a similar way to the WorklfowApplication or WorkflowServiceHost or you can add them in the CacheMetadata function of an activity.

0

精彩评论

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