Show Table of Contents
4.11. Assignment
The assignment mechanism allows you to assign a value to an object, such as a variable, before or after the particular Element is executed.
When defining assignment on an Activity Element, the value assignment is performed either before or after Activity execution. If the assignment defines mapping to a local variable, the time when the assignment is performed depends on whether the local variable is defined as an DataInput or DataOutput item.
For example, if you need to assign a Task to a user whose ID is a Process variable, use the assignment to map the variable to the parameter ActorId.
Assignment is defined in the Assignments property in case of Activity Elements and in the DataInputAssocations or DataOutputAssociations property in case of non-Activity Elements.
Note
As parameters of the type String can make use of the assignment mechanism by applying the respective syntax directly in their value,
#{userVariable}, assignment is rather intended for mapping of properties that are not of type String.
4.11.1. Defining Assignments
The assignment mechanism is available within the properties view for Activity elements as the Assignment property, and the assignment mechanism is available for non-Activity Elements in DataInputAssociations and DataOutputAssociations properties (note that not both are always available depending on the semantics of the Elements).
Data Assignments are divided into two groups:
Data Input- works only with Variables and Data Inputs.Data Output- works only with Variables and Data Outputs.
To define an assignment, select the activity and then open up the Properties panel. Click in the Value column for the
Assignments property, and then click the drop-down arrow. This will open up the Assignment Editor.
Click one of the three buttons in this editor to add a new assignment. Available objects and assignment values, created separately, are available after clicking the drop-down arrow in the respective field.

- Input Assignment: Lets you assign a Data Input to a literal value.
- Input Mapping: Lets you map a Data Input variable to an object.
- Output Mapping: Lets you map a Data Output variable to an object variable.
The resulting string (as shown in the figure) for the assignments will resemble:
[din]DI1=65.0,[din]var1->DI2,[dout]DO1->var2
It is no longer possible to add invalid assignments as used to be case in previous versions of the Assignment Editor.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.