Decomposed Activities and Sub-Activities

A decomposed activity is an activity that contains sub-activities. It is equivalent to a SubactivityState and an activity graph in UML. The decomposed activity behaves like a specialized package or container. A sub-activity can itself be decomposed into further sub-activities, and so on.

Note: To display all activities in the model in the List of Activities, including those belonging to decomposed activities, click the Include Composite Activities tool.

You can decompose activities either directly in the diagram using an editable composite view or by using sub-diagrams. Sub-objects created in either mode can be displayed in both modes, but the two modes are not automatically synchronized. Editable composite view allows you to quickly decompose activities and show direct links between activities and subactivities, while Read-only (Sub-Diagram) mode favors a more formal decomposition and may be more appropriate if you decompose through many levels.

You can choose the mode for viewing composite activities on a per-object basis, by right-clicking the symbol and selecting the desired mode from the Composite View menu.

You cannot create a package or any other UML diagram type in a decomposed activity, but you can use shortcuts to packages.

Working in Editable Composite View Mode

You can decompose an activity and create sub-activities within it simply be creating or dragging another activity onto its symbol. You can resize the parent symbol as necessary and create any number of sub-activities inside it. You can decompose a sub-activity by creating or dragging another activity onto its symbol, and so on.

Flows can link activities at the same level, or can link activities in the parent diagram with sub-activities in the Live Composite View:


Composite Activities

Converting an Atomic Activity to a Decomposed Activity

You can convert an atomic activity to a decomposed activity in any of the following ways:

  • Press Ctrl and double-click the activity symbol (this will open the sub-activity directly)

  • Open the property sheet of the activity and, on the General tab, select the Decomposed Activity radio button

  • Right-click the activity and select Decompose Activity from the contextual menu

When you create a decomposed activity, a sub-activity diagram, which is empty at first, is added below its entry in the browser:



To open a sub-activity diagram, press Ctrl and double-click on the decomposed activity symbol, or double-click the appropriate diagram entry in the Browser.

You can add objects to a sub-activity diagram in the same way as you add them to an activity diagram. Any activities that you add to a sub-activity diagram will be a part of its parent decomposed activity and will be listed under the decomposed activity in the Browser.

You can create several sub-activity diagrams within a decomposed activity, but we recommend that you only create one unless you want to design exception cases, such as error management.

Note: You can locate any object or any diagram in the Browser tree view from the current diagram window. To do so, right-click the object symbol, or the diagram background and select Edit > Find in Browser.