Consider the following statechart:
The Customer gets state Confirmed, the resource is in state NotAssigned. There is no guard defined for the transition from Confirmed to the Join pseudostate.
In this scenario, does the state Confirmed remain active until NotAssigned transitions to Assigned? (i.e. I can send the trigger 'cancels' so that customer enters the 'NotConfirmed' state, which is the behavior I would like to obtain). Or am I not using the correct way to model this? (and how would a statechart look then)
Edit (after comment Gangnus) What I'm after is understanding
So what I want to obtain is deeper understanding of the join state. I looked through the UML spec (formal-1108-06.pdf chapter 15), but did not find a clear description for my scenario mentioned above: if I enter Confirmed, and Confirmed is connected to a Join using a transition with no guard or trigger specified, while NotAssigned is active in the Resource region, when does Confirmed its active status:
how the join pseudostate functions
A citation from UML Standard:
This type of Pseudostate serves as a common target Vertex for two or more Transitions originating from Vertices in different orthogonal Regions.
Transitions terminating on a join Pseudostate cannot have a guard or a trigger.
... join Pseudostates perform a synchronization function, whereby all incoming Transitions have to complete before execution can continue through an outgoing Transition.
(Vertices are states or pseudostates)
when does a state connected to a join loose its active status?
The state loses the active state by some event or after ending the doActivity behaviour in it. No state or pseudostate ever can influence ending of the state standing BEFORE it. Your states Confurmed and Assigned have no events and transitions from them to the join has no behaviours, so both transition are reached
, traversed
and completed
at once, and the join merely waits both of them to become active.
So, the join is "active" only while waiting. It has no real active state! Because it has no entry or exit behaviours.
does the state Confirmed remain active until NotAssignded transitions to Assigned?
Notice, both these transitions could be local
- that means, when they are completed, the state they are going off, remain active, or external
- if they exit the source vertices(states Confirmed and Assigned). Alas, UML notation doesn't show this kind
of transitions on them. But...
"a Transition of kind local can be shown as a Transition leaving a State symbol containing the text “*.”"
Your diagram is OK.
For better understanding, use standard 2.5 beta instead of 2.4. They describe the same language, but the 2.5 is more understandable. (not MUCH understandable yet)