locked
Execution of activity does not fire after re-loading workflow RRS feed

  • Question

  • I have created a custom activity (referred to as X) which accesses a workflow extension and sets a property of the extension (then create a bookmark). I use this extension to get values out of the workflow as it progresses. The workflow consists of multiple child activities (all of type X).

    My problem is that I persist the workflow and then, later re-load into my WorkflowApplication. It does not execute the Execute method of the current activity. Therefore, the property is not set on the extension. Thus, I am un-able to get the value from the current activity.

    Hope my explanation is clear enough. Are there idea's out there to get around my problem?

     

    Monday, July 12, 2010 10:55 AM

Answers

All replies

  • Paraphrasing: you implemented a Workflow extension, which goes through this sequence of events:

    -create an extension (in some activity's Execute() method? Or from CacheMetadata to set up the default extension? Or from the host?),
    -persist workflow
    -unpersist workflow
    -try to access the extension

    and either 
    -the extension is no longer there at all? or
    -the extension *is* there, but its state has been lost?

    Tim

    Tuesday, July 13, 2010 11:00 PM
  • Make your extension a PersistenceParticipant, then it can store its state when the workflow persists.
    • Proposed as answer by Dan Glick - MSFT Wednesday, July 14, 2010 7:56 PM
    • Marked as answer by Andrew_Zhu Monday, July 19, 2010 5:50 AM
    Tuesday, July 13, 2010 11:53 PM
  • I'll will try this.

     

    Thanks Dan

    Wednesday, July 14, 2010 11:31 AM