Skip to content

Get Variables from Workflow Instance

Parameter Configuration

ParameterDescription
Process Instance IDID of the workflow instance. You can use expressions to get context variables and specify dynamic content.
Task VariableTask variable. When enabled, it retrieves variables stored on the task corresponding to the Task ID.
Task IDTask ID. You can use expressions to get context variables and specify dynamic content.
Variable IDThe Variable ID to be retrieved. Variable ID can use expressions to get context variables and dynamically specify.

Return Value

ParameterDescription
VariableThe retrieved workflow variable. Returns null if the specified variable is not found.

Notes

  • Task Variable
    • When enabled, retrieves variables on the current task
    • When enabled, you need to fill in the Task ID for variable retrieval

When enabling Store form data as task variables (task variables are only visible to the current task) in the process task node, to retrieve form information of process task variables, the Variable ID needs to use ${form}_task, where ${form} is the form identifier.

Usage Scenarios

  • After a workflow task is completed, when calling automation to operate data, you can obtain workflow variable information through the process data of the Workflow Task Parameters that are passed in.
  • When a workflow Service Node is executed, you can obtain workflow variable information through the process data of the Workflow Task Parameters that are passed in.