Partitions

In activity diagrams, you can use partitions to group the activity nodes and edges that have common characteristics. Partitions provide a view of the behaviors in an activity, but do not affect the control flow or object flow.

You can use several partitions to allocate characteristics or resources to the nodes of the activity. For example, partitions are useful in business modeling and can show which organizational units are responsible for various activities in a business process.

Each partition in an activity has a unique name that describes who or what is responsible for the activities in the partition. Partitions can be aligned vertically or horizontally, or can be freeform, meaning that you can place them anywhere in diagrams. The nodes and edges in an activity diagram can reference one or several partitions.

You can represent hierarchical partitioning of the activity nodes in a diagram by nesting partitions within partitions.

As the following figure illustrates, a partition is displayed as a rectangle in the activity. The name compartment displays the name of the partition and the element that it represents, and the shape compartment displays the activity nodes and edges. In this example, the partition, named Partition1:Actor1, contains a opaque action and a subpartition, named Subpartition1:Component1. The subpartition contains a central buffer node and a datastore node that are connected by a control edge.

An activity diagram that contains a partition with an opaque action and a subpartition composed of a central buffer node and a data store node.

Tip: To change the orientation of the flow of nodes and edges in a partition, right-click in the node; then click Vertical flow.

Assigning control nodes to partitions

By default, when you add control nodes to a partition, either by creating new ones or dragging them from the Project Explorer view, they are not assigned to the partition. You can assign a control node to a specific partition using the Properties view on the Partitions page.

If you prefer to have the control nodes automatically assigned to the partitions, you can disable the default behavior by clicking Windows > Preferences > Modeling > Diagrams > Activity Diagram; then clicking the Enable control node re-partitioning on diagram check box.

Partition notation

In some situations, it might not be practical to display partitions in an activity diagram; for example, when more than one partition contains an activity node. As the following figure illustrates, an alternative is to display the partition names in the name compartment of the activity node. In this example, the contents of the name compartment show that the opaque action is contained in two partitions: Partition and Partition 2.


Feedback