Structured Activity

Return to Introduction  Previous page  Next page

You can add a Structured Activity element to an Activity diagram. A Structured Activity element is a composite of an element, a link and a child Activity diagram, which is represented by the small symbol in the bottom right-hand corner of the element.

There are five types of Structured Activity, each representing a particular structure of activity events. The five types are represented below:

SubActivities      StructAct      CondStructAct      SequentialStructAct      LoopStructAct

·Simple Composite - represents an arrangement of activities that take place independent of each other
·Structured Activity node - represents an ordered arrangement of activities; that is, activities that have relationships
·Conditional node - represents an arrangement of activities where choice determines which activities are performed
·Sequential node - represents a sequential arrangement of activities
·Loop node - represents a sequence of activities that are - or can be - repeated on the same object.

To create a Structured Activity, drag the Structured Activity element from the Activity Elements page in the Enterprise Architect UML Toolbox onto the diagram. The New Structured Activity dialog displays, on which you specify which type of Structured Activity to create.

NewStructuredActivityDialog

To display the Activity diagram represented by the Structured Activity element, double-click on the element.

Nested Structured Activities

Structured Activity elements can point to child diagrams that themselves contain or consist of Structured Activity elements; that is, the Structured Activity elements are nested. When you create nested Structured Activity elements, they are shown as nested in the Project Browser window; see the example below. 

SubActivitiesTree

Toolbox Icon

e_SubActivity

OMG UML Specification

Structured Activity Node

The OMG UML specification (UML 2.1 Superstructure, section. 12.3.48) states:

"A structured activity node is an executable activity node that may have an expansion into subordinate nodes as an ActivityGroup. The subordinate nodes must belong to only one structured activity node, although they may be nested."

"A structured activity node represents a structured portion of the activity that is not shared with any other structured node, except for nesting."

Loop Node

The OMG UML specification (UML 2.1 Superstructure, section 12.3.35) states:

"A loop node is a structured activity node that represents a loop with setup, test, and body sections."

"Each section is a well-nested subregion of the activity whose nodes follow any predecessors of the loop and precede any successors of the loop. The test section may precede or follow the body section. The setup section is executed once on entry to the loop, and the test and body sections are executed repeatedly until the test produces a false value. The results of the final execution of the test or body are available after completion of execution of the loop."

Sequential Node

The OMG UML specification (UML 2.1 Superstructure, section 12.3.47) states:

"A sequence node is a structured activity node that executes its actions in order."

Conditional Node

The OMG UML specification (UML 2.1 Superstructure, section 12.3.18) states:

"A conditional node is a structured activity node that represents an exclusive choice among some number of alternatives."

"A conditional node consists of one or more clauses. Each clause consists of a test section and a body section. When the conditional node begins execution, the test sections of the clauses are executed. If one or more test sections yield a true value, one of the corresponding body sections will be executed. If more than one test section yields a true value, only one body section will be executed. The choice is nondeterministic unless the test sequence of clauses is specified. If no test section yields a true value, then no body section is executed; this may be a semantic error if output values are expected from the conditional node."