Skip to content

Conditions / Guards

You can use any valid C-Code in guards as long as it produces a truth value, but be sure to reference instance attributes by prepending me->/this-> in front of them regarding the C/C++ Instantiation.

Additionally, you can use the keyword else, which you can omit if you want to, for specifying a guard which always evaluates to true and is checked only after all the guards from the competing flows evaluate to false. It can therefore be used similarly to the else keyword in C.

Make sure that the outgoing flows of a decision are mutually exclusive, and that there's always one flow for which the guard evaluates to true.

The code generator only checks for multiple occurrences of empty control flows and will report an error if such a condition is encountered, but the behavior with non-mutually-exclusive control flows is undefined.

See also