Object Flows in Activity Diagrams

In Activity diagrams, there are several ways to define the flow of data between objects.

The following diagram depicts a simple Object Flow between two actions, Fill Order and Ship Order, both accessing order information.

 

Activity-ObjectFlow1

See UML Superstructure Specification, v2.1.1, figure 12.110, p. 391.

 

This explicit portrayal of the data object Order, connected to the Activities by two Object Flows, can be refined by using the following format. Here, Action Pins are used to reflect the order.

 

Activity-ObjectFlow2

See UML Superstructure Specification, v2.1.1, figure 12.110, p. 391.

 

The following diagram is an example of multiple Object Flows exchanging data between two actions.

 

Activity-ObjectFlow4

See UML Superstructure Specification, v2.1.1, figure 12.111, p. 391.

 

Selection and transformation behavior, together composing a sort of query, can specify the nature of the Object Flow's data access. Selection behavior determines which objects are affected by the connection. Transformation behavior might then further specify the value of an attribute pertaining to a selected object.

Selection and transformation behaviors can be defined by attaching a note to the Object Flow. To do this, right-click on the Object Flow and select the Attach Note or Constraint context menu option. A dialog lists other flows in the diagram, to which you can select to attach the note, if the behavior applies to multiple flows. To comply with UML 2, preface the behavior with the notation «selection» or «transformation».

 

Activity-ObjectFlow3

See UML Superstructure Specification, v2.1.1, figure 12.112, p. 392.