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 Add Assignment 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.

Data assignment Editor for BPMS User Guide 6.0.2
Invalid assignments are deleted when the editor is closed. The alert displayed below appears for any invalid assignment.
Assignment Alert for the BPMS User Guide 6.0.2

Figure 4.23. Invalid Assignment Alert