Search code examples
workflow-foundation-4scope

Having a variable survive to a sub-workflow?


Givn is a cmoplex workkflow set for data laoading. We run a number of custom activities that work as "Scopes". For example, an DataLoadActivityScope is configurd, contains data load actions and exposes standard variables for those. This works nice - we feed the varables into the DataLoadActivityScope and the embedded action activities pick them up atuomatically - saves a lot of wiring up that gets tendious.

My problem is: we have a numer of technical wrokflows that jsut contain a number of data activities and are isolated in their own workflows for ease of development.

And - the defiend variables do NOT pass into the sub-workflow.

What is the easiest way to handle this?

I CAN set up the varaibles as InArguments in the sub-workflow, then set a DataLoadActivityScope there and feed them in there again... which works, but requires the technical worfklows to be modified.

I would rather love the variables scope to dynamically extend into the sub-workflows.

Any chance to do that?


Solution

  • Nope, variables are only visible to the workflow containing them. If you want to pass them on you need to do so through arguments.