Previous UML Classes Table of Contents UML Packages Next


15.3.8 Pseudostate

BehaviorStateMachines


   A pseudostate is an abstraction that encompasses different types of transient vertices in the state machine graph.

*Generalizations

   • V

    ertex (from BehaviorStateMachines ) on page 605

   Description

   Pseudostates are typically used to connect multiple transitions into more complex state transitions paths. For example, by combining a transition entering a fork pseudostate with a set of transitions exiting the fork pseudostate, we get a compound transition that leads to a set of orthogonal target states.

   Attributes

Issue 9191 -add default value and remove list

   • kind: PseudostateKind Determines the precise type of the Pseudostate. Default value is initial..

   Associations

Issue 8409 -correct subsets constraint and ‘state’ entry

   Constraints

   [1] An initial vertex can have at most one outgoing transition.

Issue 8409 -remove redundant ‘(‘

   (self.kind = #initial) implies(self.outgoing->size <= 1)

   [2] History vertices can have at most one outgoing transition.

   ((self.kind = #deepHistory) or (self.kind = #shallowHistory)) implies(self.outgoing->size <= 1)

   [3] In a complete statemachine, a join vertex must have at least two incoming transitions and exactly one outgoing transition.

Issue 8409 -bold the word ‘and’

   (self.kind = #join) implies((self.outgoing->size = 1) and (self.incoming->size >= 2))

   [4] All transitions incoming a join vertex must originate in different regions of an orthogonal state.

   Issue 8409 -add missing ‘)‘

   (self.kind = #join)

   impliesself.incoming->forAll (t1, t2 | t1<>t2 implies(self.stateMachine.LCA(t1.source, t2.source).container.isOrthogonal))

   [5] In a complete statemachine, a fork vertex must have at least two outgoing transitions and exactly one incoming transition.

   (self.kind = #fork) implies

   ((self.incoming->size = 1) and (self.outgoing->size >= 2))

   [6] All transitions outgoing a fork vertex must target states in different regions of an orthogonal state.

   Issue 8409 -add missing ‘)‘

   (self.kind = #fork)

   impliesself.outgoing->forAll (t1, t2 | t1<>t2 implies(self.stateMachine.LCA(t1.target, t2.target).container.isOrthogonal))

   [7] In a complete statemachine, a junction vertex must have at least one incoming and one outgoing transition.

   (self.kind = #junction) implies

   ((self.incoming->size >= 1) and (self.outgoing->size >= 1))

   [8] In a complete statemachine, a choice vertex must have at least one incoming and one outgoing transition.

   (self.kind = #choice) implies

   ((self.incoming->size >= 1) and (self.outgoing->size >= 1))

   Issue 8611 - remove constraints that limit entry and exit points to just top regions 8753 -add new constraint 8968 -duplicate of 8611

   [9] The outgoing transition from an initial vertex may have a behavior, but not a trigger or guard.

   (self.kind = PseudostateKind ::initial) implies (self.outgoing.guard->isEmpty() and self.outgoing.trigger->isEmpty())

   Semantics

   The specific semantics of a Pseudostate depends on the setting of its kind attribute.

Issue 8753 - clarify that the initial transition cannot have a trigger or a guard

   with the transition leading to the terminate pseudostate. Entering a terminate pseudostate is equivalent to invoking a DestroyObjectAction .

   Notation

   An initial pseudostate is shown as a small solid filled circle (see Figure 15.16 ). In a region of a classifierBehavior state machine, the transition from an initial pseudostate may be labeled with the trigger event that creates the object; otherwise, it must be unlabeled. If it is unlabeled, it represents any transition from the enclosing state.


Issue 8401 -fix typo Figure 15.16 - Initial Pseudostate

   A shallowHistory is indicated by a small circle containing an ‘H’ (see Figure 15.17 ). It applies to the state region that directly encloses it.


   Figure 15.17 - Shallow History

   A deepHistory is indicated by a small circle containing an ‘H*’ (see Figure 15.18 ). It applies to the state region that directly encloses it.


   Figure 15.18 - Deep History

   An entry point is shown as a small circle on the border of the state machine diagram or composite state, with the name associated with it (see Figure 15.19 ).


   




   Figure 15.19 - Entry point

   Optionally it may be placed both within the state machine diagram and outside the border of the state machine diagram or composite state.

   An exit point is shown as a small circle with a cross on the border of the state machine diagram or composite state, with the name associated with it (see Figure 15.20 ).

   





   Figure 15.20 - Exit point

   Optionally it may be placed both within the state machine diagram or composite state and outside the border of the state machine diagram or composite state.

    Figure 15.21 illustrates the notation for depicting entry and exit points to composite states (the case of submachine states is illustrated in the corresponding Notation subsection of State (from BehaviorStateMachines , ProtocolStateMachines ) on pag e 571 ).

Figure 15.21 - Entry and exit points on composite states

   Alternatively, the bracket notation shown in Figure 15.9 and Figure 15.10 on page 552 can also be used for the transition-oriented notation.

   A junction is represented by a small black circle (see Figure 15.22 ).

Figure 15.22 - Junction

   A choice pseudostate is shown as a diamond-shaped symbol as exemplified by Figure 15.23 .

   





   





Issue 8401 -fix typo Figure 15.23 - Choice Pseudostate

   A terminate pseudostate is shown as a cross, see Figure 15.24 .


   Figure 15.24 - Terminate node

   The notation for a fork and join is a short heavy bar (Figure 15.25). The bar may have one or more arrows from source states to the bar (when representing a joint). The bar may have one or more arrows from the bar to states (when representing a fork). A transition string may be shown near the bar.

   Process

Figure 15.25 - Fork and Join

*Presentation Options

   If all guards associated with triggers of transitions leaving a choice Pseudostate are binary expressions that share a common left operand, then the notation for choice Pseudostate may be simplified. The left operand may be placed inside the diamond-shaped symbol and the rest of the Guard expressions placed on the outgoing transitions. This is exemplified in Figure 15.26.

   


[>10]


   


[Id>10]



   [<=10]

   [Id<=10]

   Figure 15.26 - Alternative Notation for Choice Pseudostate

   Multiple trigger-free and effect-free transitions originating on a set of states and targeting a junction vertex with a single outgoing transition may be presented as a state symbol with a list of the state names and an outgoing transition symbol corresponding to the outgoing transition from the junction.

   The special case of the transition from the junction having a history as target may optionally be presented as the target being the state list state symbol. See Figure 15.27 and Figure 15.28 for examples.

   


s1, s2

   e

   s3

   Figure 15.27 - State List Option

   VerifyCard,


VerifyCard,ReleaseCard

   


VerifyTransaction logVerifylogCard

   Figure 15.28 - State Lists

   Changes from previous UML