UML activity diagram: Action and Activity

uml

Most UML software has two kinds of nodes for the activity diagram: Action and Activity. To me it seems that an Activity could represent something that by itsself would be represented by another activity diagram, and the actions would be seen as "atomic".

Is this the correct semantic view?

Best Answer

Yes, your semantic view is almost correct.

The UML 2.5 standard explains us in section 15.1 that activities are made of activities and actions:

An Activity is a kind of Behavior that is specified as a graph of nodes interconnected by edges. A subset of the nodes are executable nodes that embody lower-level steps in the overall Activity.
(...)
The only kind of executable nodes in UML are Actions (...). Actions are required for any significant capabilities of Activities.

Section 16.1 further explains that:

An Action is the fundamental unit of behavior specification in UML. An Action may take a set of inputs and produce a set of outputs, though either or both of these sets may be empty. Some Actions may modify the state of the system in which the Action executes.

So yes, an action is elementary. But it is not necessarily atomic, as explained in section 16.2.3.1:

However, an Action execution may also result in the invocation of another Behavior. An Action is therefore simple from the point of view of the Behavior containing it but may be complex in its effect and not atomic.

Related Topic