[英]Windows Workflow 4, persistence, and Data Services
So I'm starting to work with the new workflow enginge (Windows Workflow Foundation 4 - WF 4) after previously working with 3.5. 因此,在先前使用3.5之后,我将开始使用新的工作流引擎(Windows Workflow Foundation 4-WF 4)。 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).
但是,现在我试图将一些现有的工作流程移植到WF 4,并且遇到了一些障碍(通常是这样)。
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. 所以我的主要问题是,在WF 3中,所有操作都是基于接口的,工作流运行时负责“链接”接口和应用程序启动时的操作,并且工作流本身在将自身序列化到数据库时从未拥有对象的实例,这正是我想要的,因为我从不希望对数据服务进行序列化。
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. 现在在WF 4中,我似乎需要将数据服务作为参数传递给工作流,因此当数据服务持久化到数据库时,它也会对变量进行序列化。 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 thinking in the old WF 3 mentaility? 我是否想念某些东西,也许想起旧版WF 3? Or is there a pattern I can use to do this?
还是有一种我可以使用的模式?
In WF4 workflow or activity extensions are the replacement for WF3 sercices. 在WF4工作流程或活动扩展中,是WF3服务的替代品。 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.
您可以通过类似于WorklfowApplication或WorkflowServiceHost的方式添加它们,也可以将它们添加到活动的CacheMetadata函数中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.