Hi Guys,
Is it possible to pass a variable from one sequence to another.
I have a terminal session for a IBM machine configured in one sequence, and setting a new outputConnection setting “terminalSession”.
Id like to be able to use this variable again in another sequence, and the only way i can see to pass a variable is to invoke a workflow file, which i don’t want to do, as it will open another IBM session, which is not what i want, id like to be able to resume the connection.
I can get all this working in one sequence, but when using two separate sequences i cant figure out how to do it, without invoking the file.
You will need to make the variable more global by changing the scope. Hope that helps. When it’s global or of a more outer sequence scope, the variable will be seen in the other inner sequences.
Hi Clayton,
Thanks for the response. But if im working with one large workflow, that then opens other workflows and calls workflow files, setting the variable at Main will not work, as it essentially calls a sequence outside of the main, and this will not recognise the variable. Hope that makes sense.
Hi declan,
To do what you are explaining, you will want to have the variable declared in the workflow that calls the other workflows. Then, pass that variable as an “In/Out” in the Arguments section. That way, the variable goes into the workflow, changes, then returns with the new value and can be seen by the rest of the workflows.
However, if the variable only changes in one workflow then you might just want it declared in the workflow that changes it then pass it as an “Out” in the Arguments section. In the main workflow, you will then store that “Out” variable to a variable you have declared within your main workflow.
Hope that makes sense, too.
Thanks.
Is there any other way to implement it without passing as an arguments like adding some class library or something like that