I’m attempting to use a parallel action to allow both a Legal Reviewer and Financial Reviewer to review an agreement at the same time. With the parallel action --- each of the reviewers will be assigned a flexi-task. The flexi-task will allow the reviewer to either: 1) approve the agreement or 2) request additional info from the contract champion (the person who submitted the agreement for review).
If one of the reviewers requests additional info from the champion, the workflow has a change state that then assigns a flexi task to the champion. Once the champion completes their task (by selecting resubmit for review), the change state should send the agreement back to the Financial and Legal reviewers for approval once again.
However, I can’t seem to get the workflow to change its state from the reviewer to the champion.
If you look at the image below, if the Legal Reviewer requests “Additional information or changes....”, an email should be sent to the contract champion (this works correctly) and then the state change should kick in and move the workflow to the ‘Contract Champion – Step 1 Reviewers’...but it doesn’t. Instead the workflow ran right through the change state. I’ve tried putting in a pause and end state to try to stop the workflow from bypassing the change state but now the workflow will send the email to the contract champion and then end.
Anyone have any suggestions or ideas on how to get the change state to work properly? My next idea is to remove everything below the email notification and re-do the workflow to see if that fixes it.
Solved! Go to Solution.
Also note this from the help file.
The state machine construct uses Change State actions to set which state to run next. The actions in a state are repeated until a Change State action is encountered and all actions in the state have completed executing. Workflow execution does not move to the next state instantly when the Change State action is run. The workflow moves to the next state once all actions in the current state have completed executing.
So in your current workflow picture, it will end without changing states.
I see 3 problems with your workflow.
2. parallel action only ends when all the configured branches are done. so when one of reviewers respond to the task, SM doesn't switch to the other state until the other reviewer do so as well.
furthermore, you should implement some logic how to proceed when one reviewer rejects the task (request for additional info) and the other reviewer approves. without the proper logic it might happen that last response will always control next SM state.
3.it looks like you miss SM state change in 3 workflow paths - right responses of every flexi task.
I know this is not whole workflow and you might have them somewhere later down the way, I just would like you to make sure that you have no path within SM with no state change. otherwise it will make run SM in endless loop.
and at last, I would recommend to jump off of SM with end state machine action and not with end workflow action.
Brendan & Marian ---
Thank you for explaining that the change state will not occur until all the branches in the parallel action are executed - very helpful. It appears that I need to remove the Change State from the "Additional Info/Changes Required..." pathway. And find another way to allow the flexibility I'm looking for.
Marian - are you suggesting in point 2 that I can remove the Change State and write in logic that will have a similar effect to what I'm trying to achieve? And to clarify --- I'm basically trying to use the tasks to allow for communication between the Reviewer(s) and the Contract Champion by allowing the Reviewer to request more information, then allowing the Contract Champion to provide feedback via completion of a task. If there is a better way to allow for the reviews to happen in parallel but also allow one Reviewer to approve and another to request additional information to which the Champion can respond, I would love to hear it/see it. I'm new to Nintex so I'm kind of stumbling around through this workflow.
Rather than doing a parallel action, you can just assign both reviewers to the same Flex-task action. It will send a task to both of them. Then depending on the responses you get, you can have logic to handle whether or not to send the process back to the champion. I just ran a test and here is how I setup the Flexi task. For the Behaviour (or Behavior for us American types), I selected "All must agree". Then in the Advanced Options, I check the box for "Include 'Other' branch...". So there are 3 possible outcomes.
In the Approve Branch you would have your Change State go to Step 2. In the other 2 branches you would have the logic to Change State to go back to the Champion. Below is an example workflow where one person approved and one rejected. You can see that it went down the "Other" branch in that scenario. If you want to include the reason why the person rejected in the notification back to the Champion, you'd need to do some extra steps to extract the comments. In the 3rd screen shot below, you can see in the workflow history where it shows both the responses and their comments. This is captured in the "All Approver Comments' common property.
no I didn't suggest to remove SM.
I just wanted to point out that with setup you posted, if first (time-wise) reviewer rejected the task and second approved then your workflow (SM) would act as if task was approved by both, which is likely not desired.
so, you should implement some logic after parallel action that would evaluate outcome of flexi task from every single parallel action branch, and if at least outcome was to reject, then switch SM to review by champion.