Is there a way to retrieve all the variable names in a workflow process?

Hi,

Quick question is there a way to retrieve all variable names present in a workflow process?

Thanks!

Regards,
E

Hi,
I just wanted to clarify your question in that you want to retrieve the variable names used in the Workflow and not the actual contents of the variables is that correct? Also, Workflow has Local, Global, System and Job Information variables. Do you want a list of all of them, or just perhaps the names of all Local and Global variables used by a particular Process?

Best Regards

Justin Leigh

Hi Justin,

Yes, I want to get all local variable names set. But now that you mentioned it, it would be handy to get global variable names as well :slight_smile:

And yes only the names not the content Justin.

Edit: Although once I get all the variable names anyway I would have access to its content. Using GetVariable or ExpandString.

Thank you

To add of what Im thinking of doing:

I want in my workflow to be able to output all variables in a .ini file. For example if my workflow have variables

var1=“value1”
var2=“value2”

I want to output a file calling it “out.ini” and have all saved variable name and values.So I can retrieve this file later on down the track.

Thanks

Hi,
The actual Workflow configuration file (workflowname.ol-workflow) is a XML file, which contains tags listing the Local and Global variable names:
image

You could iterrogate it to retrieve and write out the variable names in an .INI.

Best Regards

Justin Leigh

Interesting.

I would prefer it be accessible in a “Run Script”
Then perhaps read the current workflow running?

For example:
var currentWorkflow = Watch.GetWorkflow();
… interrogate the workflow …
… find the variables of the current process.
… output ini.file…

So I dont have to specify which workflow configuration Im intending to interrogate.
Something like that.

Anyways thank you Justin. I’ll see if I can figure something around this.

Can you let us know please in what kind of situation you would like to achieve this? Or, in other words, can you let us know please why you would like to do this?

Hi Marten,

I have a really complex process that contains several variables. Im thinking maybe there is a way to save the “state” of the process so it can resume from where it left of. Im jumping the gun here.

So really what I want to know if there is a way to pause/resume a running process. If not then this is what Im thinking below:

Basically I want to split my process to two 2 parts. Data process and Print process. Once the data process has finished, I want to save all the variables/values thats been set into a “ini” file. All temp files still intact during the data process etc.

Now I will have processed data files, that I can check/interrogate/investigate/client checking to make sure all data are correct before proceeding to print.

When everythings good.The ini file that got generated, I can feed back to the very same process. And set all the values back again using scripting. Then the process continuous producing print output and reports thus ending the process.

Hope that make sense.
It goes without saying that this process I want to make it as generic as possible. So it can be reuse.

Thank you.