You can update the values of variables before or after a worklet runs. This allows you to pass information from one worklet to another within the same workflow or parent worklet. For example, you have a workflow that contains two worklets that need to increment the same counter. You can increment the counter in the first worklet, pass the updated counter value to the second worklet, and increment the counter again in the second worklet.
You can also pass information from a worklet to a non-reusable session or from a non-reusable session to a worklet as long as the worklet and session are in the same workflow or parent worklet. You can assign variables in reusable and non-reusable worklets.
You can update the values of different variables depending on whether you assign them before or after a worklet runs. You can update the following types of variables before or after a worklet runs:
Pre-worklet variable assignment.
You can update user-defined worklet variables before a worklet runs. You can assign these variables the values of parent workflow or worklet variables or the values of mapping variables from other tasks in the workflow or parent worklet.
You can update worklet variables with values from the parent of the worklet. Therefore, if a worklet is in another worklet within a workflow, you can assign values from the parent worklet variables, but not the workflow variables.
Post-worklet variable assignment.
You can update parent workflow or worklet variables after the worklet completes. You can assign these variables the values of user-defined worklet variables.
You assign variables on the Variables tab when you edit a worklet.