Class UML 2.3::State
Description:
The states of protocol state machines are exposed to the users of their
context classifiers. A protocol state represents an exposed stable situation
of its context classifier: when an instance of the classifier is not processing
any operation, users of this instance can always know its state configuration.
Direct Superclasses: Namespace,
RedefinableElement,
VertexDirect Subclasses: FinalStateClass Precedence List: State,
Namespace,
RedefinableElement,
Vertex,
NamedElement,
ElementProperties:
![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
connection :
ConnectionPointReference (0 *); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
connectionPoint :
Pseudostate (0 *); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
deferrableTrigger :
Trigger (0 *); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
doActivity :
Behavior (0 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
entry :
Behavior (0 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
exit :
Behavior (0 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
isComposite : Boolean (1 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
isOrthogonal : Boolean (1 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
isSimple : Boolean (1 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
isSubmachineState : Boolean (1 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
redefinedState :
State (0 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
redefinitionContext :
Classifier (1 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
region :
Region (0 *); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
stateInvariant :
Constraint (0 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
submachine :
StateMachine (0 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
elementImport :
ElementImport (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
importedMember :
PackageableElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
member :
NamedElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
ownedMember :
NamedElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
ownedRule :
Constraint (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
packageImport :
PackageImport (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
isLeaf : Boolean (1 1); -- source
RedefinableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
redefinedElement :
RedefinableElement (0 *); -- source
RedefinableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
container :
Region (0 1); -- source
Vertex![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
incoming :
Transition (0 *); -- source
Vertex![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
outgoing :
Transition (0 *); -- source
Vertex![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
clientDependency :
Dependency (0 *); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
name : String (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
nameExpression :
StringExpression (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
namespace :
Namespace (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
qualifiedName : String (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
visibility :
VisibilityKind (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
ownedComment :
Comment (0 *); -- source
Element![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
ownedElement :
Element (0 *); -- source
Element![](/se-interop/image/down-arrow.png?hunchentoot-session=9990%3A2083A820575200CB8BF323D4633827E1)
owner :
Element (0 1); -- source
ElementConstraints:
Signature: submachine_states() : Boolean;
Description: Only submachine states can have connection point references.
Expression: isSubmachineState implies connection->notEmpty ( )
Signature: submachine_or_regions() : Boolean;
Description: A state is not allowed to have both a submachine and regions.
Expression: isComposite implies not isSubmachineState
Signature: entry_or_exit() : Boolean;
Description: Only entry or exit pseudostates can serve as connection points.
Expression: connectionPoint->forAll(cp|cp.kind = #entry or cp.kind = #exit)
Signature: destinations_or_sources_of_transitions() : Boolean;
Description: The connection point references used as destinations/sources of transitions
associated with a submachine state must be defined as entry/exit points
in the submachine state machine.
The OCL used here is not normative.Editor's notes: stateMachine, not statemachine.
Expression: self.isSubmachineState implies (self.connection->forAll (cp |
cp.entry->forAll (p | p.stateMachine = self.submachine) and
cp.exit->forAll (p | p.stateMachine = self.submachine)))
Original: self.isSubmachineState implies (self.connection->forAll (cp |
cp.entry->forAll (p | p.statemachine = self.submachine) and
cp.exit->forAll (p | p.statemachine = self.submachine)))
Signature: composite_states() : Boolean;
Description: Only composite states can have entry or exit pseudostates defined.
Expression: connectionPoint->notEmpty() implies isComposite
Operations:
Signature: redefinitionContext.1() : Classifier;
Description: The redefinition context of a state is the nearest containing statemachine.
Expression: result = let sm = containingStateMachine() in
if sm.context->isEmpty() or sm.general->notEmpty() then
sm
else
sm.context
endif
Signature: isSubmachineState.1() : Boolean;
Description: Only submachine states can have a reference statemachine.
Expression: result = submachine.notEmpty()
Signature: isSimple.1() : Boolean;
Description: A simple state is a state without any regions.
Expression: result = region.isEmpty()
Signature: isRedefinitionContextValid(redefined : State; ) : Boolean;
Description: The query isRedefinitionContextValid() specifies whether the redefinition contexts of a state are properly related to the redefinition contexts of the specified state to allow this element to redefine the other. The containing region of a redefining state must redefine the containing region of the redefined state.
Expression: result = true
Signature: isOrthogonal.1() : Boolean;
Description: An orthogonal state is a composite state with at least 2 regions
Expression: result = (region->size () > 1)
Signature: isConsistentWith(redefinee : RedefinableElement; ) : Boolean;
Description: The query isConsistentWith() specifies that a redefining state is consistent with a redefined state provided that the redefining state is an extension of the redefined state: A simple state can be redefined (extended) to become a composite state (by adding a region) and a composite state can be redefined (extended) by adding regions and by adding vertices, states, and transitions to inherited regions. All states may add or replace entry, exit, and 'doActivity' actions.
Expression: result = true
Signature: isComposite.1() : Boolean;
Description: A composite state is a state with at least one region.
Expression: result = region.notEmpty()
Signature: containingStateMachine() : StateMachine;
Description: The query containingStateMachine() returns the state machine that contains the state either directly or transitively.
Expression: result = container.containingStateMachine()
Send questions or comments to
[email protected].