Why I get a loop though I have no looping action


Badge +2

Hi All,

I'm using state machine for the first time and it was working fine until today.  I added a log history to pin point where the problem is but I don't understand why it's happening.  In my image below, the state machine starts off in the correct branch but then loops about 250 times (log history action) and never gets to the switch.

217148_pastedImage_2.png

This is what the log history logs 250 times.  The text you see is what I added in the log history "Pending Chief Approval Branch Before Switch"

217149_pastedImage_3.png

Any idea what I'm doing wrong?   Thanks!


7 replies

Badge +5

I don't know what you may have done wrong, without further details

Can you put a log in history in each of the branches of your switch - then you would know if it had travelled down any of those legs

You did put a change state after the switch?

Can you share the remainder of the workflow?

Badge +2

Here's the remainder

217134_pastedImage_1.png

Badge +5

I see the problem - every branch needs to end with a change state task

What happens without is - as you discovered - it goes back to the top of that state again

Userlevel 2
Badge +11

And at least one branch should have an End/Exit State Machine. A state machine is nothing more than a fancy Loop. And as such changing branches is the same as a new loop iteration. Both have a Wait for action in the backend, slowing the process down (in order to offload the Nintex workflow engine)..

Badge +2

what if I don't need it to switch states?  What do I do?

Badge +2

I don't see a End/Exit State Machine action

Userlevel 2
Badge +11

It's a choice in the Change State action: End State Machine.

Reply