Maki
Loading...
Searching...
No Matches
Self-Transition

Definition

A self-transition is a transition whose source and target is the same state.

Simple State

In the example below, whenever ST is active and the event E happens, the state machine executes exit_action, then entry_action.

Composite State

In the case of a composite state, besides the execution of possible exit and entry actions, a self-transition also causes external transitions to the initial state for all the regions.

In the example below, whenever ST is active and the event E happens, the state machine executes, in the region of ST, an external transition from the active substate (whatever it is) to X.

How to Define a Self-Transition with Maki

An external self-transition is a transition going from ST to ST:

(ST, ST, maki::event<E>)