State Machines at Runtime

At runtime a state model executes as a state machine, which begins in the start state.

By default a state machine starts when its concept instance is asserted. When a concept is asserted so are its contained concepts, if any, so all its contained concept state machines are also started.

However you can change this default behavior and instead use a function in your rules to start the state model, at some point after the concept is asserted. The function has a parameter that controls whether contained concept state models are also started.me

The state machine begins in the start state. If the transition to the next state has a rule, then the state stays at start until the rule’s conditions are met. When they are met the following occurs:

  • The start state’s exit action executes (if one exists)
  • The transition rule actions execute (if any exist)
  • If the transition to the next state crosses more than one composite or concurrent state boundary before ending at its target, all entry actions associated with those boundaries execute.
  • The next state’s entry action executes (if it exists).

The same general process repeats as the machine moves from state to state, with the addition that there could be multiple exit actions, if the transition crosses any enclosing boundaries on its way to its target.

When a state machine exits an enclosing state, it exits all the enclosed states too.

If a state or state machine times out, then other actions occur as explained in State Model Timeouts and State Timeouts