简体   繁体   中英

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. 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. Keep in mind that the could be multiple active asynchronous activities when a workflow is persisted.

See this question for how to do so.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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