Structured activities

In activity diagrams, structured activities are a type of node that you can use to create logical groups of activity nodes and edges. You can add activity nodes and edges to a structured activity; however, these nodes and edges belong only to the structured activity. They are not shared with other structured activities.

When a structured activity is invoked, the activity nodes in the structured activity do not start until all of the input data is received. The output data from a structured activity is not available to other nodes in the activity, and flow does not continue through the activity, until all the actions in the structured activity have finished running.

Each structured activity has a unique name that identifies the behavior that you are modeling.

As the following figure illustrates, a structured activity is displayed as a rectangle with a dashed-line outline and rounded corners. The name compartment contains the name of the structured activity, StructuredActivityNode, and the keyword «structure». The activity compartment contains the nodes and edges that you add to the structured activity node.

A structured activity containing two opaque actions in a control flow.

Tip: You can change the orientation of the flow of nodes and edges in a structured activity node by right-clicking in the node; then clicking Vertical flow.


Feedback