Jump to content

User:ProgrammerInFL/sandbox

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by ProgrammerInFL (talk | contribs) at 16:09, 7 October 2012 (refs). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
File:C:\temp\20121007\Action.jpg
The UML Basic Actions Diagram

In the Unified Modeling Language, an Action is an executable activity node that is the fundamental unit of executable functionality in an activity, as opposed to control and data flow among actions.[1] It is the elementary unit that describes executable behavior. Action Inherits from the abstract class NamedElement in the UML Kernel. An Action may or may not have a Classifier. Action is the class used to create all actions in a UML model.

An action is the fundamental unit of behavior specification.[2] An action takes an input, or set of inputs, and converts them into an output or set of outputs. The input to an action can be the output of another action, or a value specification.

The UML Predefined Actions

Basic Actions

  • OpaqueAction: Specifies a set of language-specific instructions, including the language itself, such as Java, C#, OCL or natural language.[1]

Basic Invocation Actions

  • InvocationAction: The abstract superclass for actions that invoke behavior or operations, or that send signals or objects.[1]
  • CallAction: The abstract superclass for actions that invoke a behavior or operation and receive return values.[2]
  • SendSignalAction: An action that takes the input paramaters to creat a signal which it then sends to a specified object.
  • CallBehaviorAction: This action calls another behavior directly. Any arguments of this action are passed to the called behavior.
  • CallOperationAction: Invokes an operation at a specified object.

Object Actions

  • CreateObjectAction: An action that creates an instance of the specified classifier and supplies the result object at the output pin.
  • DestroyObjectAction: An action that destoys the object passe to it via the input pin.
  • TestIdentityAction: An action that has exactly two input values and supplies a Boolean value via the output pin. The action checks the objects for identity.
  • ReadSelfAction: Retrieves the host object of an action. It returns the classifer object, if one exists. Otherwise, it retrieves the activity object.

Structural Feature Actions

  • StructuralFeatureAction: An abstract superclass that describes actions that operate on static structures of classifiers.
  • ReadStructuralFeatureAction: Reads the value of a structural feature.
  • WriteStructuralFeatureAction: Changes values of a structural feature.
  • ClearStructuralFeatureAction: Deletes all values of a structural feature.
  • AddStructuralFeatureAction: Adds values to a structural feature.
  • RemoveStructuralFeatureAction: Removes a value from a structural feature.
  • LinkAction: An abstract superclass for actions that identify links based on the objects at the link ends and the qualifiers.
  • ClearAssociationAction: An action that removes all links of a specified association in which designated objects are participating.
  • ReadLinkAction: An action that returns the object residing at the other end of the link.
  • WriteLinkAction: An abstract superclass for actions that create or destroy links.
  • CreateLinkAction: An action that creates a link.
  • DestroyLinkAction: An action that destroys a link.

Variable Actions

  • VariableAction: An abstract superclass for actions that interact with variables.
  • ReadVariableAction: Reads the content of a specified variable.
  • WriteVariableAction: Writes or deletes the content of a specified variable.
  • ClearVariableAction: Clears all values of a variable.
  • AddVariableValueAction: Adds a value to a variable.
  • RemoveVariableValueAction: Removes a specified value from a variable.

Class Actions

  • AcceptCallAction: An accept event representing the receipt of a call request.[2]
  • AcceptEventAction: Waits for an occurence of an event meeting a specified condition.[2]

Miscellaneous Actions

  • ValueSpecificationAction: Evaluates a value specification.
  • ReduceAction: Reduces a collection to a single value by combining the elements of the collection.[2]



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 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

  • 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.

Notes

Updated for the UML version 2.4.1

Further Reading

Weilkiens, Tim; Oestereich, Bernd (2007). UML 2 Certification Guide. Morgan Kaufman. ISBN 0-12-373585-8.


References

  1. ^ a b c UML 2 Certification Guide, Tim Weilkiens and Bernd Oestereich - ISBN: 0-12-373585-8
  2. ^ a b c d e OMG Unified Modeling Language, Superstructure, Version 2.4.1