cancel
Showing results for 
Search instead for 
Did you mean: 
isogunro
Nintex Newbie

Why I get a loop though I have no looping action

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.

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"

Any idea what I'm doing wrong?   Thanks!

Tags (2)
0 Kudos
Reply
7 Replies
graham
Nintex Newbie

Re: Why I get a loop though I have no looping action

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?

0 Kudos
Reply
isogunro
Nintex Newbie

Re: Why I get a loop though I have no looping action

Here's the remainder

0 Kudos
Reply
graham
Nintex Newbie

Re: Why I get a loop though I have no looping action

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

0 Kudos
Reply
jpmhuls
Nintex Newbie

Re: Why I get a loop though I have no looping action

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)..

0 Kudos
Reply
isogunro
Nintex Newbie

Re: Why I get a loop though I have no looping action

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

0 Kudos
Reply
isogunro
Nintex Newbie

Re: Why I get a loop though I have no looping action

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

0 Kudos
Reply
jpmhuls
Nintex Newbie

Re: Why I get a loop though I have no looping action

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

0 Kudos
Reply