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!
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?
Here's the remainder
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
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)..
what if I don't need it to switch states? What do I do?
I don't see a End/Exit State Machine action
It's a choice in the Change State action: End State Machine.