Is there a way to automatically convert arguments to variables or vice versa?

After extracting an activity as a workflow, is there a way to convert arguments to variables besides doing it manually?

And vice versa

Right click on your sequence and select extract as workflow, it will do it automatically.


After extracting an activity as a workflow, ,In the extracted workflow, is there a way to change from an argument to a variable?

arguments are inputs for your workflow you can define any number of local variables inside the workflow.

Is here an answer to this? I know what @rlwalters means as I have the same issue myself and the answers above don’t cover it.

To clarify: I extracted a sequence within my projected as a workflow. When I did this it converted all the variables used within that sequence into arguments. The problem is that this sequence should only have a single input argument and a single output argument. All the other variables are simply for use within the sequence and should not be presented to the invoking activity.

I have a long list of 20-something arguments which is confusing to anyone who wants to use this workflow later, and presents me with the task of having to manually create the same number of new variables, remap them within the worklflow and then delete the arguments.

Hence the question: Is there a way to automatically convert arguments back into variables?

Hi @Foehl

Although really not recommended, you could probably get away with editing the xaml file if you know what you are doing.

Please also look into the scopes of your variables, as per this post:

1 Like

On the bright side, you only need to do this once. If it becomes a trend, then you or the developers need to approach their project design better where the variables and arguments are planned out correctly from the beginning.

@loginerror Do you know if there are plans for a “Replace” or “Replace All” down the pipeline in Studio? Kind of like you can do in like every other application known to man :laughing:
just wondering or maybe it’s already there and I just don’t know.

1 Like

Hi @ClaytonM

I laughed way too much at this :smiley:
The answer is yes though - this feature will eventually reach Studio.

There is at least already a small “Search&Replace” in the string editor … useful for example, if you write longer programs in .
IMHO opinion, first it would be an important improvement to automatically follow renamed variables in every activity- there are still some missing to work like the variable in for each …