简体   繁体   English

从WF 4.0中的持久性存储加载工作流实例时获取当前活动

[英]Getting current activity when a workflow instance loads from persistent store in WF 4.0

I've still been trying to wrap my head around some workflow issues we've been having. 我仍在努力解决我们遇到的一些工作流程问题。 I'm using Workflow foundation 4.0 and I need to get the current activity of an instance when I load it from persistence. 我正在使用Workflow Foundation 4.0,并从持久性加载实例时需要获取实例的当前活动。 I tried using tracking, but that does not get called when the instance is loaded. 我尝试使用跟踪,但是在加载实例时不会被调用。

I'd like to avoid having to persist this information myself if at all possible. 如果可能的话,我想避免自己保留这些信息。

Do you have any idea about how to do this? 您有关于如何执行此操作的想法吗?

Regards, Anže 问候,安热

As far as I know using tracking is the only way to monitor which activity starts and stops. 据我所知,使用跟踪是监视活动开始和停止的唯一方法。 Using a workflow extension deriving from PersistenceParticipant you can save the data as part of the workflow itself. 使用从PersistenceParticipant派生的工作流扩展,您可以将数据保存为工作流本身的一部分。 Keep in mind that the could be multiple active asynchronous activities when a workflow is persisted. 请记住,当工作流持续存在时,这可能是多个活动的异步活动。

See this question for how to do so. 有关如何操作,请参见此问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM