State Machine Execution Sequence

Anyone knows the correct answer to this question and can explain why please?

@Palaniyappan perhaps u can help with this

Maybe this can help

  1. Activity in entry section are performed

  2. Activity inexit section are performed

  3. Trigger condition are evaluated

  4. Activity in trigger action are performed

I think this is the order

A state can have an Entry and an Exit action. (A state configured as a final state may have only an entry action). When a workflow instance enters a state, any activities in the entry action execute. When the entry action is complete, the triggers for the state’s transitions are scheduled. When a transition to another state is confirmed, the activities in the exit action are executed, even if the state transitions back to the same state. After the exit action completes, the activities in the transition’s action execute, and then the new state is transitioned to, and its entry actions are scheduled.


As you can see, I created a very simple state machine, in one state I just put log messages to track the order. According to this the answer is:


1 Like
  1. Entry section
  2. Trigger action
  3. Trigger conditions are evaluated
  4. Exit section

If you need clear explanation why it works so, then search for “UiPath State machine UiPath RPA” in youtube, you can see the first video uploaded by the user “UiPathRPA”

@NIVED_NAMBIAR @Surya_Narayana_Korivipadu @jack.chan @Umut_G @dion.chan @Brett_Gates @Parth_Doshi @Priyanka_Bhalere @nisargkadam23 @Ishmeet_Bindra

How to convert sequence into state machine ?
what are the conditions to observe to convert ?
Please share one example done with both sequence and state machines

Refer this link

UiPath State Machine| State Machine Workflow UiPath | UiPathRPA

UiPath State Machine| State Machine Workflow UiPath | UiPathRPA

](UiPath State Machine| State Machine Workflow UiPath | UiPathRPA - YouTube)

You can find good explanation about state machine with examples. Take a simple example from this tutorial and try to build a state machine and also try to build the same thing with a sequence. Relate that tutorial to traffic lights scenario. You’ll understand it better.

But I don’t suggest using state machines when your process is simple and linear. You can simply take a sequence. Check the process complexity and use state machine only if it fits the state machine logic.

1 Like