Difference between Invoke and Reference Workflow
Hi,
Can anyone explain in a friendlier way the difference between Reference and Invoke?
I need to pass the execution from a main workflow to another workflow and in this 2nd one I have custom activities and client activities (such as capturing geometries) so I understood I can't use the Invoke option.
Is this correct?
If indeed I can't use the Invoke is there a way to pass a dictionary into the ReferenceWorkflow arguments? Invoke receives an IList , Reference I couldn't find any way other than adding them one by one.
Thanks in advance
0
-
Hi Ricardo,
When you use Reference Workflow, all of the activities of the referenced workflow will be loaded into the host workflow.
You can pass a Dictionary by having an in argument on your referenced workflow, and adding an In Argument to the Arguments Collection that's a Dictionary. You can choose the type of arguments in the Arguments editor.
Invoke Workflow will "call" the workflow, so the other workflows' activities are not loaded, but are instead run out of process. If the workflow is invoked synchronously, then we will wait for it to finish; if it's asynchronous then we won't.
A loose analogy:
Reference Workflow: I Will Make A Sandwich Using These Instructions.
Invoke Workflow: Computer, Make Me A Sandwich While I Watch.
Invoke Workflow Async: Computer, Go Make Me A Sandwich.
Regards,
-Malcolm0 -
Thanks for the reply.
Yes thats sort of what I was thinking.I didn't consider the Async since I literally want to pass the logic to the 2nd workflow and continue from there.
In your words, I don't want the Computer to do anything for me, I want to handle it myself so Reference is the only way to go.
I see the logic with the dictionary, I thought of that but since I already declared all my arguments in the receiving workflow I was hoping I could use them individually instead of having to receive a Dictionary then extracting each of them.
Thanks ;)0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
2 kommentarer