Is the order of transitions decisive in state machines?

activities
studio

#1

I have an state machine with several transitions. Is the order of them important? I mean, is it going to start checking the first condition and after that one by one the rest or is going to chek one different each time but not in a specified order?
image


#2

Yeah, the order is important. It checks them from top to bottom in that order, so if a condition becomes true on multiple transitions it always chooses the top one. This is useful to know also because the very last transition at the bottom could be used as the Default if none of the other transitions’ conditions are met, by using True as the condition since it’s the last transition anyway.

Regards.


#3

Thanks @ClaytonM :grinning: