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

Workflow suspends because the value provided for Set Next State did not resolve to a valid state

Jump to solution

I have been slowly building and testing my new State Machine workflow when I have run into an issue using my Set Next State as Other using a Text variable.  My workflow has two states that potentially can reject my request called RA Manager Review & Country Manager Review. 

So I setup a Set Workflow variable at the top of these two branches and created a text variable called varLastStateTXT  and set their values to be as RA Manager Review & Country Manager Review in the appropriate place.  I next set a Task for the Initiator that allowed Resubmission or Cancellation of their request. 

In Cancellation we Exit the State Machine which works perfectly.  In the Resubmit Branch I have setup my Set Next State as a dynamic to send a response back to the branch that rejected the submission.  The value for the State Machine is set as Other with a value varLastStateTXT.

I then set a log before the Set Next State action to find where it was going to be sent  - it returned Country Manager Review (which I expected as they rejected the submission) but the workflow suspended at this point.  The message in the log says: "The value provided for Set Next State did not resolve to a valid state". 

I have attached a document with the snapshots of the workflow and the log. Hoping that someone may have a solution or something else I can check to resolve this.

0 Kudos
Reply
3 Replies
jeff_l
Nintex Newbie

Re: Workflow suspends because the value provided for Set Next State did not resolve to a valid state

Jump to solution

Have you ever been able to use a text variable to set a state machine?  I don't know for certain, but would guess that the state machine is an index (since you pull from a drop down) and setting it to a value of 0, 1, 2 from a variable maybe could work?

 

However, I'd suggest just putting a conditional before you set the state machine that evaluates the text variable and then have a set next state down each path where you use the drop down to select the state for that path.

0 Kudos
Reply
wooly
Nintex Newbie

Re: Workflow suspends because the value provided for Set Next State did not resolve to a valid state

Jump to solution

Thanks for the response Jeffrey.  I have set a text variable called varLastStateTXT and it is set as the first action in the two decision state branches. It is strange that it works for the first branch (RA Manager Review) but not for the second (Country Manager Review).  Here is an excerpt from the log where I have placed the log just before the Set Next State to see where it had come from

The workflow is now suspended with this message: 

I could put a Conditional Action and branch to either of the two other states but feel that the above should work so am trying to figure out the Nintex error in evaluating my variable first before modifying the design.

0 Kudos
Reply
wooly
Nintex Newbie

Re: Workflow suspends because the value provided for Set Next State did not resolve to a valid state

Jump to solution

Refreshed all the State Values by copying to Notepad then back into Nintex.  Re-ran the workflow and it has succeeded.  I will put this down to glitch from the initial copy and paste.  At least it proves that using this technique in looping in the State machine is a valid way of working.  It resolves our need for a feedback loop at two places within the workflow.Jason Sexton

0 Kudos
Reply