Skip to content

Set Variables in Workflow

Parameter Configuration

ParameterDescription
Process Instance IDWorkflow instance ID. Dynamic content can be specified using expressions to get context variables
Task VariableTask variable. When enabled, the written variables will be stored on the task corresponding to the Task ID
Task IDTask ID. Dynamic content can be specified using expressions to get context variables
VariablesList of variables to set. Variable values can be dynamically specified using expressions to get context variables

Usage Instructions

  • Task Variable
    • When enabled, the set variables will be stored on the task and only visible to the current task
    • When enabled, you need to fill in the Task ID where the variables are stored

Notes

When the workflow task node enables Store form data as task variables (task variables are only visible to the current task), to set form information for process task variables, the Variable ID needs to use ${form}_task, where ${form} is the form identifier

Usage Scenarios

  • For example, workflow task percentage approval: when users agree or reject, you can record the number of approvals and rejections on the task, and reference the set variables in workflow settings to calculate the completion of process nodes
  • Set workflow instance variables to determine subsequent branches of the process at decision nodes
  • Set workflow instance variables to control node approvers of subsequent nodes