Book a Demo
Prev Next

Final

A Final node used in UML Activity Diagrams modeled in Sparx Systems Enterprise Architect.

Description

Two nodes can be used to define a Final state in an Activity, both defined in UML 2.1 as of type Final Node. The Activity Final element indicates the completion of an Activity; upon reaching the Final, all execution in the Activity diagram is aborted. The other type of final node, Flow Final, depicts an exit from the system that has no effect on other executing flows in the Activity.

The next example illustrates the development of an application. The process comes to a Flow Final node when there are no more components to be built; note that the Fork element indicates a concurrent process with the building of new components and installation of completed components. The Flow Final terminates only the sub-process building components. Similarly, only those tokens entering the decision branch for the installation of further components terminate with the connecting Flow Final (that is, stop installing this component, but keep on installing other components). It is only after the Deliver Application activity is completed, after the control flow reaches the Final node, that all flows stop.

The node that initiates a flow is the Initial node.

UML Activity Diagram example showing the use of an Activity Final node, in Sparx Systems Enterprise Architect.

See the OMG Unified Modeling Language specification, (v2.5.1, figure 12.91, p.374.)

Notes

  • Moving a diagram generally does not affect the location of elements in Packages; if you move a diagram out of one Package into another, all the elements in the diagram remain in the original Package

    However, Final elements are used only within one diagram, have no meaning outside that diagram, and are never re-used in any other diagram; therefore, if you move a diagram containing these elements, they are moved to the new parent Package with the diagram

Toolbox icon

Final element

Learn more

OMG UML Specification:

The OMG Unified Modeling Language specification, (v2.5.1, p.388) states:

A FinalNode is a ControlNode at which a flow in an Activity stops. A FinalNode shall not have outgoing ActivityEdges. A FinalNode accepts all tokens offered to it on its incoming ActivityEdges.

There are two kinds of FinalNode:

1 A FlowFinalNode is a FinalNode that terminates a flow. All tokens accepted by a FlowFinalNode are destroyed. This has no effect on other flows in the Activity.

2 An ActivityFinalNode is a FinalNode that stops all flows in an Activity (...). A token reaching an ActivityFinalNode owned by an Activity terminates the execution of that Activity. If an Activity owns more than one ActivityFinalNode, then the first one to accept a token (if any) terminates the execution of the Activity, including the execution of any other ActivityFinalNodes.