Class UML 2.5::StateMachine
Description:
StateMachines can be used to express event-driven behaviors of parts of
a system. Behavior is modeled as a traversal of a graph of Vertices interconnected
by one or more joined Transition arcs that are triggered by the dispatching
of successive Event occurrences. During this traversal, the StateMachine
may execute a sequence of Behaviors associated with various elements of
the StateMachine.
Direct Superclasses: BehaviorDirect Subclasses: ProtocolStateMachineClass Precedence List: StateMachine,
Behavior,
Class,
BehavioredClassifier,
EncapsulatedClassifier,
StructuredClassifier,
Classifier,
Namespace,
Type,
PackageableElement,
ParameterableElement,
TemplateableElement,
RedefinableElement,
NamedElement,
ElementProperties:
![](/se-interop/image/down-arrow.png)
connectionPoint :
Pseudostate (0 *); -- source
StateMachine![](/se-interop/image/down-arrow.png)
extendedStateMachine :
StateMachine (0 *); -- source
StateMachine![](/se-interop/image/down-arrow.png)
region :
Region (1 *); -- source
StateMachine![](/se-interop/image/down-arrow.png)
submachineState :
State (0 *); -- source
StateMachine![](/se-interop/image/down-arrow.png)
context :
BehavioredClassifier (0 1); -- source
Behavior![](/se-interop/image/down-arrow.png)
isReentrant : Boolean (1 1); -- source
Behavior![](/se-interop/image/down-arrow.png)
ownedParameter :
Parameter (0 *); -- source
Behavior![](/se-interop/image/right-arrow.png)
ownedParameterSet :
ParameterSet (0 *); -- source
BehaviorThe ParameterSets owned by this Behavior.
{
composite}
Subsets: Namespace.ownedMember
![](/se-interop/image/down-arrow.png)
postcondition :
Constraint (0 *); -- source
Behavior![](/se-interop/image/down-arrow.png)
precondition :
Constraint (0 *); -- source
Behavior![](/se-interop/image/down-arrow.png)
specification :
BehavioralFeature (0 1); -- source
Behavior![](/se-interop/image/down-arrow.png)
extension :
Extension (0 *); -- source
Class![](/se-interop/image/down-arrow.png)
isAbstract : Boolean (1 1); -- source
Class![](/se-interop/image/down-arrow.png)
isActive : Boolean (1 1); -- source
Class![](/se-interop/image/down-arrow.png)
nestedClassifier :
Classifier (0 *); -- source
Class![](/se-interop/image/down-arrow.png)
ownedAttribute :
Property (0 *); -- source
Class![](/se-interop/image/down-arrow.png)
ownedOperation :
Operation (0 *); -- source
Class![](/se-interop/image/down-arrow.png)
ownedReception :
Reception (0 *); -- source
Class![](/se-interop/image/down-arrow.png)
superClass :
Class (0 *); -- source
Class![](/se-interop/image/down-arrow.png)
classifierBehavior :
Behavior (0 1); -- source
BehavioredClassifier![](/se-interop/image/down-arrow.png)
interfaceRealization :
InterfaceRealization (0 *); -- source
BehavioredClassifier![](/se-interop/image/down-arrow.png)
ownedBehavior :
Behavior (0 *); -- source
BehavioredClassifier![](/se-interop/image/down-arrow.png)
ownedPort :
Port (0 *); -- source
EncapsulatedClassifier![](/se-interop/image/down-arrow.png)
ownedConnector :
Connector (0 *); -- source
StructuredClassifier![](/se-interop/image/right-arrow.png)
part :
Property (0 *); -- source
StructuredClassifierThe Properties specifying instances that the StructuredClassifier owns
by composition. This collection is derived, selecting those owned Properties
where isComposite is true.
{
readonly,
derived}
![](/se-interop/image/down-arrow.png)
role :
ConnectableElement (0 *); -- source
StructuredClassifier![](/se-interop/image/down-arrow.png)
attribute :
Property (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png)
collaborationUse :
CollaborationUse (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png)
feature :
Feature (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png)
generalization :
Generalization (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png)
inheritedMember :
NamedElement (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png)
isFinalSpecialization : Boolean (1 1); -- source
Classifier![](/se-interop/image/right-arrow.png)
ownedTemplateSignature :
RedefinableTemplateSignature (0 1); -- source
ClassifierThe optional RedefinableTemplateSignature specifying the formal template
parameters.
{
composite}
Subsets: Element.ownedElement
Redefines: TemplateableElement.ownedTemplateSignature
Opposite: RedefinableTemplateSignature.classifier
![](/se-interop/image/down-arrow.png)
ownedUseCase :
UseCase (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png)
powertypeExtent :
GeneralizationSet (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png)
redefinedClassifier :
Classifier (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png)
representation :
CollaborationUse (0 1); -- source
Classifier![](/se-interop/image/down-arrow.png)
substitution :
Substitution (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png)
templateParameter :
ClassifierTemplateParameter (0 1); -- source
Classifier![](/se-interop/image/down-arrow.png)
useCase :
UseCase (0 *); -- source
Classifier![](/se-interop/image/down-arrow.png)
elementImport :
ElementImport (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png)
importedMember :
PackageableElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png)
member :
NamedElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png)
ownedMember :
NamedElement (0 *); -- source
Namespace![](/se-interop/image/right-arrow.png)
ownedRule :
Constraint (0 *); -- source
NamespaceSpecifies a set of Constraints owned by this Namespace.
{
composite}
Subsets: Namespace.ownedMember
Opposite: Constraint.context
![](/se-interop/image/down-arrow.png)
packageImport :
PackageImport (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png)
package :
Package (0 1); -- source
Type![](/se-interop/image/down-arrow.png)
visibility :
VisibilityKind (0 1); -- source
PackageableElement![](/se-interop/image/down-arrow.png)
owningTemplateParameter :
TemplateParameter (0 1); -- source
ParameterableElement![](/se-interop/image/right-arrow.png)
templateBinding :
TemplateBinding (0 *); -- source
TemplateableElementThe optional TemplateBindings from this TemplateableElement to one or more
templates.
{
composite}
Subsets: Element.ownedElement
Opposite: TemplateBinding.boundElement
![](/se-interop/image/down-arrow.png)
isLeaf : Boolean (1 1); -- source
RedefinableElement![](/se-interop/image/down-arrow.png)
redefinedElement :
RedefinableElement (0 *); -- source
RedefinableElement![](/se-interop/image/down-arrow.png)
redefinitionContext :
Classifier (0 *); -- source
RedefinableElement![](/se-interop/image/down-arrow.png)
clientDependency :
Dependency (0 *); -- source
NamedElement![](/se-interop/image/down-arrow.png)
name : String (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png)
nameExpression :
StringExpression (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png)
namespace :
Namespace (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png)
qualifiedName : String (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png)
ownedComment :
Comment (0 *); -- source
Element![](/se-interop/image/down-arrow.png)
ownedElement :
Element (0 *); -- source
Element![](/se-interop/image/down-arrow.png)
owner :
Element (0 1); -- source
ElementConstraints:
No additional constraints.
Operations:
Signature: isRedefinitionContextValid(redefinedElement : RedefinableElement; ) : Boolean;
Description: The query isRedefinitionContextValid() specifies whether the redefinition
context of a StateMachine is properly related to the redefinition contexts
of the specified StateMachine to allow this element to redefine the other.
The context Classifier of a redefining StateMachine must redefine the context
Classifier of the redefined StateMachine.
Expression: result = (if redefinedElement.oclIsKindOf(StateMachine) then let redefinedStateMachine : StateMachine = redefinedElement.oclAsType(StateMachine) in self._'context'().oclAsType(BehavioredClassifier).redefinedClassifier-> includes(redefinedStateMachine._'context'()) else false endif)
Signature: isConsistentWith(redefiningElement : RedefinableElement; ) : Boolean;
Description: The query isConsistentWith() specifies that a redefining StateMachine is
consistent with a redefined StateMachine provided that the redefining StateMachine
is an extension of the redefined StateMachine : Regions are inherited and
Regions can be added, inherited Regions can be redefined. In case of multiple
redefining StateMachine, extension implies that the redefining StateMachine
gets orthogonal Regions for each of the redefined StateMachine.
Expression: result = (-- the following is merely a default body; it is expected that the specific form of this constraint will be specified by profiles true)
Signature: ancestor(s1 : Vertex; s2 : Vertex; ) : Boolean;
Description: The query ancestor(s1, s2) checks whether Vertex s2 is an ancestor of Vertex
s1.
Expression: result = (if (s2 = s1) then true else if s1.container.stateMachine->notEmpty() then true else if s2.container.stateMachine->notEmpty() then false else ancestor(s1, s2.container.state) endif endif endif )
Signature: LCAState(v1 : Vertex; v2 : Vertex; ) : State;
Description: This utility funciton is like the LCA, except that it returns the nearest
composite State that contains both input Vertices.
Expression: result = (if v2.oclIsTypeOf(State) and ancestor(v1, v2) then v2.oclAsType(State) else if v1.oclIsTypeOf(State) and ancestor(v2, v1) then v1.oclAsType(State) else if (v1.container.state->isEmpty() or v2.container.state->isEmpty()) then null.oclAsType(State) else LCAState(v1.container.state, v2.container.state) endif endif endif)
Signature: LCA(s1 : Vertex; s2 : Vertex; ) : Region;
Description: The operation LCA(s1,s2) returns the Region that is the least common ancestor
of Vertices s1 and s2, based on the StateMachine containment hierarchy.
Expression: result = (if ancestor(s1, s2) then s2.container else if ancestor(s2, s1) then s1.container else LCA(s1.container.state, s2.container.state) endif endif)
Send questions or comments to
[email protected].