Behavior : State Machine Diagrams - Transitions - Guard Conditions
7 important questions on Behavior : State Machine Diagrams - Transitions - Guard Conditions
A Guardian Condition can be a :
- It can be a Boolean expression involving properties values of the current object
- parameters of the incoming event
- or property values of reachable objects.
How does Guardian Conditions work?
If any are found, their guard conditions are evaluated.
Which conditions can you have on a Guardian Condition?
- True: If a true guard condition is found, the transition fires and any ongoing behaviors in the current state are interrupted.
- False :If a guard condition that evaluates to false is found, the search continues looking for another possible candidate transition.
- Multiple Transitions: If multiple transitions have guard conditions that evaluate to true for the same event, the transition chosen may be arbitrary.
- Higher grades + faster learning
- Never study anything twice
- 100% sure, 100% understanding
It is possible for a guard condition to test the state of a reachable object [Object Path] in State 1 or [Object Path] not in State 2.
Why is the Object Path needed?
Where is the guard condition placed?
It is surrounded by square brackets
In some circumstances, the state machine rules are easier to see when presented in a ....![]()
Especially when you see it in the table format, the commonality of the response in the Borrowed Book state to the Returned event is a bit more apparent. It can be (reverse) factored out to make the diagram easier to understand.
What is a "Static Conditional Branch" ![]()
The question on the page originate from the summary of the following study material:
- A unique study and practice tool
- Never study anything twice again
- Get the grades you hope for
- 100% sure, 100% understanding
![Trustpilot Logo](/images/design_2020/lp/clp-trustpilot-en.png)