State Icon Properties

From Flowcode Help
Jump to navigationJump to search

A State Diagram consists of several state icons interconnected with transitions. Like a transition, a state icon has a display name (i.e. the text displayed on the state within the diagram) and an optional function.


The function is code that is executed when the program flow enters (or remains in) that state icon.

This can be to call a macro, perform a calculation, delay program execution or execute some custom C code.


States will perform their optional function when program flow enters that state through a transition from another state.


States usually have one or more exit transitions: arrows that flow out of the state icon with optional conditions that must be true for program execution to ‘flow’ along that Transition.

These exit Transitions are evaluated in turn until one is found to be true. The evaluation order of these transitions can be set by clicking “Set transition order” or by reconnecting the start end of the transition to the state.


A state without an exit transition will force program execution to remain in that state until the program is stopped by the user.


Each state diagram must contain a single “Entry State” icon which contains the code to be executed when the program enters that macro.

Only one transition can exit this entry state and neither this transition nor the entry state can be deleted from the state diagram.