A Set Variable Task lets you assign or update process variable values directly in Studio Modeler without writing a script. Use this task when you need to set a variable to a specific value, calculate a value using an expression, or copy a value from another process variable. Updated values become available to all downstream activities when the task executes.
Set Variables Tasks provide a low-code alternative to Script Tasks for common variable assignments and simple calculations. You can use a Set Variables Task when you need to set a process status value, copy values between variables, calculate simple values using expressions, or prepare data before a connector, form, or decision table executes.
When the process reaches the Set Variables Task, variable values are updated and stored in the process context. Changes take effect immediately at the point where the task executes in the process flow.
Set Variables tasks are displayed in the process diagram as a rounded rectangle containing a paper sheet with a pencil:
The basic properties of a set variables task are:
| Property | Required | Description |
|---|---|---|
| ID | Required | Unique identifier for the user task. The value is generated automatically and cannot be modified. Example: UserTask_0w526j8. |
| Name | Optional | Name displayed on the process canvas. |
| Description | Optional | Description of the user task. Expressions can be used to generate dynamic descriptions based
on process variables. The rendered value is displayed in Digital Workspace and Admin
applications. The description can be made dynamic by writing an expression, for example: ${workflowType} for ${dealNumber} Closing Coordinator Task - Review Document. In the Digital Workspace and the Admin app, the expression is dynamically rendered as a user-friendly task description. For example, the previous expression might render as: Commitment and Policy for DEA1235385 Closing Coordinator Task - Review Document. |
| Asynchronous Continuation | Optional | When enabled, the task executes in the background using a separate transaction from the overall process execution. |
| Multi Instance Type | Required | Defines whether the task executes once or multiple times for a collection of items. The selected option determines the multi-instance execution behavior. For more information, see Understanding Multi-Instance Activities. |
| Mapping Type | Required | Defines how data is passed between the task and the process. The selected mapping type determines which process variables are available to the task and how output values are returned to the process. For more information, see Mapping Process Variables. |
In addition to the basic start event properties, a Set Variables Task has the following properties:
| Property | Description |
|---|---|
| Set variables |
A section where you can define which variables are set by the task. You can select primitive variable types and configure their value or use an expression to update them automatically. For more information, see Configuring Variables for the Set Variables Task. Note: This section is only available if the
variables are already defined for the process. For more information,
see Creating and Editing Process Variables.
|