Using null transitions

In some cases, it is useful to use a transition to leave a state without using a trigger.

About this task

These are examples of such cases:

  • When a state tries to allocate a resource that might not be available
  • When you want to branch according to some entry action
  • When you have a join transition

You can accomplish this connection with a null transition. A null transition is any transition without a trigger (event or timeout). Null transitions can have guards (for example, [x == 5]). The run-to-completion semantics of theRhapsody® framework checks for an infinite (run-time) loop of null transitions, which might otherwise be difficult to detect.

You can modify the maxNullSteps number and recompile the framework if you need to change the number.