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

Continuing a WorkFlow when an Approval has been rejected

Jump to solution

I've got an approval WorkFlow.

If the task is rejected (with the initiator gets an alert asking them to fill in the list item/InfoPath form again. 

What I want to happen is that when they submit the form again that the Workflow starts again and the original manager is notified that it's been resubmitted and to take another look.

I've set up a State Machine action  with a Change State action at the end of the Rejection to switch to another state but it doesn't seem to be working? What have I done wrong? Workflow below:

Labels: (1)
0 Kudos
Reply
8 Replies
Automation Master
Automation Master

Re: Continuing a WorkFlow when an Approval has been rejected

Jump to solution

Hi there!

You have a few strange things going on in this workflow -- for example, I see 2 End Workflows in the same branch?

What I think, though, is that you need a "Switch" as the first branch in your state machine. Then, you use the Status as your switch value. That way, you can update the status in each state - for example "Waiting on Approval" "Approved" "Rejected" - and then, if status is rejected, the switch will know to start down the "Rejected" state next time it starts. In this, you would be able to say "Hey this has been submitted before" in a notification and send a specific task type ... or even just send that notification or set particular variables and send it back down the original state.

Let me know if you have questions.

rhia

0 Kudos
Reply
darrenfloyd666
Nintex Newbie

Re: Continuing a WorkFlow when an Approval has been rejected

Jump to solution

Thanks Rhia

Yes, I've giot to do some tidying up.

So I use the Switch the switch to the rejection branch? That makes sense.

Just a few questions: what would I set the 'Select the value to evaluate' to? I'm getting what's below and presumably what I need is if the workflow has been approved or rejected? I can't see that option. Finally would I just type into 'Enter the possible values'  the name of the rejection branch 'Stage Two after Rejection'?

Thanks so much for your help!

Switch Action

0 Kudos
Reply
Automation Master
Automation Master

Re: Continuing a WorkFlow when an Approval has been rejected

Jump to solution

So what I'd do in your situation is create a WFStatus column that you can write the status to. That way you control it, and in each state, you just say "when you enter this state, update WFStatus to read "Rejected"" or "Approved" etc. Like a bookmark!

Reply
darrenfloyd666
Nintex Newbie

Re: Continuing a WorkFlow when an Approval has been rejected

Jump to solution

Thanks Rhia, I really appreciate your help and this makes sense.

I created a Workflow Status Field as suggested (does it need a default value? I've left it blank). After a notification is sent out saying that it has been rejected I've created a Set field value which sets the Workflow Status to 'Rejected'.

I've set a Switch with a Rejection and Approval. The Approval doesn't need to go anywhere cause at the moment that's taken care of by the Approval branch of the Flexi Task.

I've set the Next state to 'Stage Two after Rejection' which is the name of the other State.

However I'm not getting any alerts from that State, the 'Workflow Status' field is blank and the Workflow in the list is showing as Completed?

What am I doing wrong?

Switch Action

0 Kudos
Reply
Automation Master
Automation Master

Re: Continuing a WorkFlow when an Approval has been rejected

Jump to solution

I think you're close, Darren!

So the Switch is evaluating the "Set Field Value" associated column. Can I see the configuration? I'm guessing you're putting in the "Outcome" from your task.

My initial thought here is that there may not be enough "wait time" between the update and the Switch. If this is On-Prem, and it looks like it is, I'd suggest adding a Commit Pending Changes between that field update and your switch. If it STILL ignores your switch, I'd put a Pause for 1 minute in there. (Which, will pause between 1 & 5 minutes.)

But.. you're saying that your Workflow Status Column does not contain any information, even though you've done a Set Field Value.

The other thing I'm wondering here is ... if your task has 2 branches, Approved & Rejected, you could just put the Notification & State Change under the Rejection branch, and the End Workflow under the Approved branch.  The switch is really for letting a State Machine know where to start off if it's restarted, or errors, or may be kicked off multiple times.

0 Kudos
Reply
Highlighted
darrenfloyd666
Nintex Newbie

Re: Continuing a WorkFlow when an Approval has been rejected

Jump to solution

Thanks Rhia

This is how I've got the Swicth Action configured, yes, the Workflow status is balnkSwitch Config

this is how the Set Value is configured:

0 Kudos
Reply
Automation Master
Automation Master

Re: Continuing a WorkFlow when an Approval has been rejected

Jump to solution

I see your problem -- your workflow isn't smart enough to know that Rejected and Rejection are the same word! You need to ensure it is exactly the same. Your workflow is saying to itself, "Hmm the only possible values are Rejected or Approved... and I don't see either of those! I see Rejected! Guess I'll just die."

0 Kudos
Reply
darrenfloyd666
Nintex Newbie

Re: Continuing a WorkFlow when an Approval has been rejected

Jump to solution

Got it! It's working! Basically I was looking at the wrong branch! I couldn't work out why the Workflow Status wasn't updating and that's the reason! So now put another field which the user ticks and put 'Wait for item update' action in so that the field is ticked that kicks off the approval process again.

Thanks for all your help Rhia! Couldn't have done it without you!

Reply