Action (UML)

From Wikipedia, the free encyclopedia
Jump to: navigation, search

In the Unified Modeling Language, an action is a named element that is the fundamental unit of executable functionality. The execution of an action represents some transformation or processing in the modeled system. An action execution represents the run-time behavior of executing an action within a specific behavior execution. All action executions will be executions of specific kinds of actions because Action is an abstract class. When the action executes, and what its actual inputs are, is determined by the concrete action and the behaviors in which it is used.

An action is the specification of an executable statement and is the fundamental unit of processing or behavior in an activity node that represents some transformation in the modeled system.

An action forms an abstraction of a computational procedure which is an atomic execution and therefore completes without interruption. An action is considered to take zero time and cannot be interrupted. In contrast, an activity is a more complex collection of behavior that may run for a long duration. An activity may be interrupted by events, in which case, it does not run to completion.

An action is a result of a system state change, and is realized by sending a message to an object or modifying a link or a value of an attribute.

An action may receive inputs in the form of control flows and object flows (the latter via input pins) and passes the results of its processing or transformations to one or more outgoing control flows or object flows (the latter via output pins) and onto downstream nodes.

Execution of the action cannot begin until all its prerequisites are satisfied. All incoming control flows have control tokens and all input pins have object tokens.

An action refers to the suite of rules and policies associated with a state machine state, and is represented as an object method.

Actions are contained within, and are provided context by activities.

An action behavior accompanies a transition event.

Action types[edit]

  • On Entry: occurs when an activity is entered.
  • Do: occurs while an activity is occurring. These are the steps within the activity.
  • On Exit: occurs when you leave an activity.
  • On Event: occurs upon a specific event.