The complexity of the state machine can increase in a development process. Thus, it’s recommended to specify how the API (Application Programming Interface) should be accessed. While the API depends on the execution and used event types, this guide tries to break down the main elements and define an expandable design pattern. Therefore, the following example will be used for all integration guides.
Example State Machine
The state machine contains three types of events: two in events (inEvent1, inEvent2), two out events (outEvent1, outEvent2) and one timed event (after 2 s). Two states are connected with the inEvent1 and the `after 2 s` event. Each state raises one of out event. Additionally, a final state has been added, which also is part of the API. It only can be reached by raising the in event inEvent2, if the state machine’s state StateA is active.
These are the main parts of the state machine, which can be used and must be handled: