IBM z/OS Management Facility (z/OSMF)

 View Only

 See the variable input values of a workflow

Oscar Curero Sastre's profile image
Oscar Curero Sastre posted 06/29/26 11:44 AM

Is it possible to see the values a workflow will use before the workflow is performed? My workflow consist of steps that calls other workflows based on variables.

Thanks!

CONNER FERGUSON's profile image
CONNER FERGUSON

Hello Oscar,

There are a few ways that variable values can be seen, though I'm not sure which best fits for your use case.

For an API based solution, once a workflow instance has been created, the get workflows API can be used with the returnData value set to 'variables' to retrieve info about  variables and their current values.

For a UI based solution, this is more involved as it would require an update to workflow definition files in order to have them expose the variables.

To simply display the values, the instructions field can be used. For example, an "instructions only" type step could be created as the first step in your workflow definition acts as a way to expose relevant variables to the user.  The below xml is just a small expandable example that would be included within a step element

 <instructions substitution="true">Show variable values: var = ${instance-var}</instructions>



Alternatively, if the goal is the allow the variable values to both be displayed and edited in the UI, the variables could be set to be part of a step.
This will have their current values appear in an editable format in the UI. This would also be included in a step element

<variableValue name="var" scope="instance" noPromptIfSet="false" required="false"/>




Hopefully one of these solutions works for you. Let me know if you have any questions.

Oscar Curero Sastre's profile image
Oscar Curero Sastre

Hey Conner!

Thanks for your suggestions. Yes, I saw I could get the variables from the API but my main concern was to view the variables from the webui. Your suggestion of adding a instructions step seems to accomplish this.

While we are at it, is there a way to get the list of all variables that are defined for a workflow? I would like to do something like this:

#foreach($var in $instance-variable_list)
Variable $var as value: $var.value
#end

Thanks!!

CONNER FERGUSON's profile image
CONNER FERGUSON

Glad to hear that one of my suggestions fits for your situation.

As for looping through variables, it does not seem that the Workflow engine exposes that sort of functionality. The solution will still have to be referencing each variable that you want to display explicitly.