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 assignment
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, click the drop-down arrow if you prefer to use the custom editor for data assignments rather than the manual assignment definition. In the displayed dialog, click the button to create a new assignment entry and define the assignment in the assignment table. Available Objects and Assignment values are available after clicking the drop-down arrow in the respective field.
You can define the Assignment type as
is mapped to to adopt the value of the source object to the target object or as is equal to and then define the literal value to be used for the target object in the To Value column.
Example 4.4. Input field of a property.

Invalid assignments are deleted when the editor is closed. The alert displayed below appears for any invalid assignment.

Figure 4.23. Invalid Assignment Alert

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.