Book a Demo
Prev Next

Expansion Region

A UML Region element.


On an Activity diagram, an Expansion Region encloses a group of ActivityNodes and ActivityEdges that are to be executed several times on the incoming data, once for every element in the input collection. If there are multiple inputs, the collection sizes should match; if they do not, the smallest collection determines the number of executions. The collections must also be of the same type (such as set, or bag). Any outputs must be in the form of a collection of at least the same size as the input collection; the output collection can be larger if each execution can produce more than one output.

You create an Expansion Region as one variant of a Region (the other is an Interruptible Activity Region) using the Activity pages of the Diagram Toolbox. You are prompted to specify the concurrency of the Expansion Region's multiple executions (parallel, iterative or stream). Parallel reflects that the elements in the incoming collections can be processed at the same time or overlapping, whereas an iterative concurrency mode specifies that execution must occur sequentially. A stream mode Expansion Region indicates that the input and output come in and exit as streams, and that the Expansion Region's process must have some method to support streams.

To modify the mode of an Expansion Region, right-click on it and select the 'Properties | Special Action' option, then select the 'Advanced' tab and click on the drop-down arrow in the 'mode' field..

This UML Activity diagram illustrates the use of an Expansion Region to enclose a group of Activity Nodes and Activity Edges that are to be executed several times on the incoming data, once for every element in the input collection, in Sparx Systems Enterprise Architect.

Toolbox icon

Region element

Learn more

OMG UML Specification:

The OMG Unified Modeling Language specification, (v2.5.1, pp.480-481) states:

An ExpansionRegion is a StructuredActivityNode that executes its contained elements multiple times corresponding to elements of an input collection.

An ExpansionRegion is a StructuredActivityNode that takes as input one or more collections of values and executes its contained ActivityNodes and ActivityEdges on each value in those collections. If the computation produces results, these may be collected into output collections. The number of output collections can differ from the number of input collections.