How to pass argument/variable from workfile A to workfile D without invoking workfile A again?

Hello,

I have several Workfiles, i.e. A, B, C, D, E, which I added in my main.xaml in a sequence of invoke workflows.

In Workfile A I created an argument that I would like to import into Workfile D. How do I pass this argument without adding the Invoke Workflow activity (for Workfile A) to Workfile D. I dont want to invoke Workfile A again.

Hi @happygal321

You would need to either invoke workflow D in workflow A, or you could call them both from a separate workflow and pass the argument that way.

Cheers!

@happygal321 Also, assuming you run these in order (this is what it seems like from your description), you could pass the needed argument from A => B => C => D

@sagacity I’m not running them in order!

A key piece of my earlier comment is that workflow ‘A’ runs before workflow ‘D’

@nlee1131 I do run Workflow A before D, but other workflows run in between. So there is no other way to pass the variable/argument, other than invoking workflow A in workflow B?

@happygal321

You can simply create an io argument which gets passed in/out of both workflow A and D

Ok, that wasn’t obvious - you referred to running a sequence of workflows.

So, are they called dynamically? Meaning code logic determines which workflow runs when (and thus, could be in any order), or are they static, but like, A, F, C, D, B?

How would I import it to the workflow (i.e Workflow D)?

Have a variable in your Main that is the same type as your argument. Set the ‘import’ of the argument from workflow A to this variable then when invoking workflow D you can again use this variable to import into the argument value.