Invoke a Workflow and bring back a value?

Hi Gary,

No, you don’t need to invoke again back (in fact you shouldn’t - that would create a potentially infinite loop).

I think the article you linked explains it ok’ish. Look at the bottom for type of arguments - what you need is Direction being either Out (if you only want to return the value) or In/Out (if you want to send the variable, modify its value and return it).
Please note that in both cases (Out and In/Out):

  • you need to assign the value to the argument in the Workflow(1)
  • in the arguments in the invoke activity in Workflow(0) you need to provide a variable to store the value

Sample attached.

ChildWorkflow.xaml (5.7 KB)
Main.xaml (6.5 KB)

16 Likes