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:


#4

Hello there. If that is true, please how to explain the result in the attached workflow? To me it looks like that the last added transition is checked first, but appears at bottom list.
I just got that I can’t upload files yet. But its simple flow:

StateMachine > drag State and FinalState > Put 3 Transitions State to FinalState
In the first transition drag msg-box into trigger-field with “1”, in the second with “2” and so on
Result gonna be that message from 3rd(last added) transition show up first and so on

It also works that way when using conditions. Took me a while to find out but in my book its important to know.