Class UML 2.4.1::State
Description:
A state models a situation during which some (usually implicit) invariant
condition holds.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=5999%3A09A7F175C47377B3561375E41A51E694)
connection :
ConnectionPointReference (0 *); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
connectionPoint :
Pseudostate (0 *); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
deferrableTrigger :
Trigger (0 *); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
doActivity :
Behavior (0 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
entry :
Behavior (0 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
exit :
Behavior (0 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
isComposite : Boolean (1 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
isOrthogonal : Boolean (1 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
isSimple : Boolean (1 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
isSubmachineState : Boolean (1 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
redefinedState :
State (0 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
redefinitionContext :
Classifier (1 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
region :
Region (0 *); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
stateInvariant :
Constraint (0 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
submachine :
StateMachine (0 1); -- source
State![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
elementImport :
ElementImport (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
importedMember :
PackageableElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
member :
NamedElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
ownedMember :
NamedElement (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
ownedRule :
Constraint (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
packageImport :
PackageImport (0 *); -- source
Namespace![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
isLeaf : Boolean (1 1); -- source
RedefinableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
redefinedElement :
RedefinableElement (0 *); -- source
RedefinableElement![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
container :
Region (0 1); -- source
Vertex![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
incoming :
Transition (0 *); -- source
Vertex![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
outgoing :
Transition (0 *); -- source
Vertex![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
clientDependency :
Dependency (0 *); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
name : String (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
nameExpression :
StringExpression (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
namespace :
Namespace (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
qualifiedName : String (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
visibility :
VisibilityKind (0 1); -- source
NamedElement![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
ownedComment :
Comment (0 *); -- source
Element![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
ownedElement :
Element (0 *); -- source
Element![](/se-interop/image/down-arrow.png?hunchentoot-session=5999%3A09A7F175C47377B3561375E41A51E694)
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 isComoposite
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].