Workflow Foundation 4 : Wait for multiple Receive Activity RRS feed

  • Question

  • Hello All,

    I want to do following thing in workflow foundation 4.0 (Workflow Service Application WCF)

    When client send first request through proxy workflow start and it will persist in DB. Also it is creating three task and using pick activity wait for three task to finish.

    flow is something like this.
     assign workflowID =  CreateGuid Variable that used to create correlation
     Send (Initialize Correlation Token)
      Correlation Scope
       ParallalForEach (from item in CollectionOfInteger)
        TaskId = InitilizeCorrealtionToken (workflowId + item.ToString())
         PickActivity with single branch
          [Receive Activity correlation with TaskId]

    Workflow works perfect when there is no persistance enable. But persistance enable it will throw exception that stated "Interupt in InstancePersistanceCommand" that workflow is not persisted in persistance store yet"

    Let me know if still more information required....


    Thursday, March 31, 2011 4:35 AM


  • Hi, Vitek

    Could you consider redesigning your workflow. since you are using Pick Activity. you can use Pick acitivity with three Pick branches. and no need to use ParallalForEach activity.

    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 Friday, April 8, 2011 7:19 AM
    Monday, April 4, 2011 2:40 AM