locked
Pass Data between 2 WorkFlows RRS feed

  • Question

  • Hi,

    How do I pass data between 2 workflows. I am calling a workflow dynamically from main workflow using Invoke Method.

    And I am using OUT Argument for inner workflow to pass data to main workflow. But I am not receiving the data from inner workflow to main workflow.

     

    Any idea?

    Wednesday, August 25, 2010 2:48 PM

Answers

  • Hi mchint, 

    I guess that you created an Activity that behaves as a proxy to call your inner workflow, right? 

    So I suggest to:

    1) Add InArgument(s) and OutArgument(s) to your "proxy" Activity.

    2) On the Execute() of this Activity, just BEFORE the Invoke, set up the input arguments

    3) ON the Execute() of this Activity, just AFTER Invoke completes, read the OutArguments 

    NOTE: WorkflowInvoker is syncronous execution and could be blocking for other branches of your "external" workflow, so please run inner workflow through WorkflowApplication, and use a callback to receive completion notification.

    This topic could be helpful.

    http://msdn.microsoft.com/en-us/library/dd560894.aspx

    Hope it helps,


    Adriano
    • Marked as answer by WMeher Wednesday, August 25, 2010 9:23 PM
    Wednesday, August 25, 2010 8:49 PM

All replies

  • Hi mchint,

    If you are able to drop the inner workflowin the parent workflow. You could use the inner workflow as an activity and use her arguments.

    Or One way could be to code an Activity. Add to this activity the arguments you would use with your inner workflow.

    In Execute Methode Get the arguments. Use a workflowInvoker with your aguments to schedule the workflow ;)


    Jérémy Jeanson MCP, MCTS http://blogs.codes-sources.com/JeremyJeanson/ (French or English spoken)
    Wednesday, August 25, 2010 3:34 PM
  • Hi mchint, 

    I guess that you created an Activity that behaves as a proxy to call your inner workflow, right? 

    So I suggest to:

    1) Add InArgument(s) and OutArgument(s) to your "proxy" Activity.

    2) On the Execute() of this Activity, just BEFORE the Invoke, set up the input arguments

    3) ON the Execute() of this Activity, just AFTER Invoke completes, read the OutArguments 

    NOTE: WorkflowInvoker is syncronous execution and could be blocking for other branches of your "external" workflow, so please run inner workflow through WorkflowApplication, and use a callback to receive completion notification.

    This topic could be helpful.

    http://msdn.microsoft.com/en-us/library/dd560894.aspx

    Hope it helps,


    Adriano
    • Marked as answer by WMeher Wednesday, August 25, 2010 9:23 PM
    Wednesday, August 25, 2010 8:49 PM