简体   繁体   English

Windows Workflow 4,持久性和数据服务

[英]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.

相关问题 Windows Workflow Foundation和Persistence中的子工作流 - Sub Workflow in Windows Workflow Foundation and Persistence Windows Workflow Foundation持久性架构说明? - Windows Workflow Foundation persistence schema explanation? Windows Workflow Persistence 4.5数据库表说明 - Windows Workflow Persistence 4.5 Database Table Description 将数据获取到Windows Workflow实例中 - Getting data into a Windows Workflow instance 工作流服务双工绑定 - Workflow Services Duplex Binding 在没有“持久性服务”的情况下管理工作流生命周期 - Managing workflow lifecycle without a “persistence service” SharePoint,工作流和Web服务-重新启动工作流 - SharePoint, Workflow and Web Services - restart workflow 如何在Windows Workflow中的活动之间传递数据? - How do I pass data between activities in Windows Workflow? WF4 - Rehosted工作流设计器 - 主机可以在DESIGN时将服务/数据公开给活动吗? - WF4 - Rehosted Workflow Designer - Can Host expose services/data to Activities at DESIGN time? 从自托管工作流切换到Workflow Foundation 4中的工作流服务时的持久性错误 - Persistence errors when switching from self-hosted workflow to a workflow service in Workflow Foundation 4
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM