locked
How can we access workflow variable outside the workflow when workflow is loaded from persistence in WF4? RRS feed

  • Question

  • How can we access workflow variable outside the workflow when workflow is loaded from persistence in WF4?
    Tuesday, March 22, 2011 1:30 PM

Answers

All replies

  • We have created a workflow with bookmarks and persisted the workflow. Now we want to access persisted workflow variable on load of workflow second time from pesistence without using ResumeBookmark() method?
    • Merged by Andrew_Zhu Tuesday, March 29, 2011 3:47 AM
    Thursday, March 24, 2011 10:09 AM
  • Hi, Sikander Singh

    For others‘ reference:

    Create a Persistence Participant  for the workflow. Right before the workflow instance be persisted and unloaded. Code we wrote in the Persistence Participant class will store Variable values in another database(or files).

    So that we can query these variables. see:
    http://msdn.microsoft.com/en-us/library/ee473464.aspx

    Another way: We can promote some variables, and we can query this variables directly, see:
    http://msdn.microsoft.com/en-us/library/ee364726.aspx

     

    Regards


    MSDN Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    This posting is provided "AS IS" with no warranties, and confers no rights. My Blog: http://xhinker.com
    Microsoft Windows Workflow Foundation 4.0 Cookbook
    • Marked as answer by Andrew_Zhu Tuesday, March 29, 2011 3:49 AM
    Monday, March 28, 2011 2:17 AM