Change peer reviewer

Brendan Hallida
Kilo Guru

Hi all,

We have a fairly standard change workflow, which when it gets to the peer review stage, sends an approval to the user that is added to the u_peer_reviewer field.   The peer reviewer then approves or denies the change.

An issue has come up where the person peer reviewing may need to change (this happens more than you would think), however if this stage has already been reached, the peer review is still with the original peer reviewer.

Here is an example of what I mean

1st Peer Reviewer

find_real_file.png

Approvers tab

find_real_file.png

We have changed our peer reviewer because of reasons

find_real_file.png

Approvers tab - as you can see, it still has the first peer reviewer.

find_real_file.png

What is the best way to address this?   Essentially we would like it if the peer reviewer changes field changes, cancel the existing peer reviewer approval and create a new one.

here is our change workflow

find_real_file.png

I hope this explains everything, and any advise would be most appreciated

Cheers,

Brendan

1 ACCEPTED SOLUTION

Ok, I think I got it!



First of all, I hope someone much smarter than me has a more elegant solution. Actually, I don't think this solution is TOO terrible. Here goes.



Everything you have seems right except we need to tell the Approval activity (the one that is running through as Approved even when you roll back) not to consider "Skipped" as "Approved. To do that we have to edit the Workflow Condition. Locate your Approval workflow activity and click on the "Approved" condition.


find_real_file.png



Then, edit the condition line to say: activity.result == 'approved'



Finally, after the rollback, you have to set your State to something like Work in Progress. I find that the rollback and change in approvers is forcing my task state to be Requested, even if that's not a valid state.



Give it a whirl and you should be good to go! I tested the above steps in my instance and got this to work so you should have success with this method.



My instance:



First, the approver is Aada Larsen. I derived this from a field I created on my form called "Approver":


find_real_file.png



Then I change the approver to "Abel Tuter" on my form. I then manually executed the rollback via Background script:


find_real_file.png



Anf finally, in my task record, the approver is Abel Tuter:


find_real_file.png




I hope this helps! If so, mark the answer is helpful and set this post to Answered.



Good luck, Brendan!


View solution in original post

10 REPLIES 10

Hi Jon,



Thanks for that - the peer reviewer approval is now cancelling and adding the new peer reviewer in.



There seems to be another issue with the workflow now.   Once the peer reviewer has been changed, the workflow then moves on past the approval user for peer review activity and sets the value to Implement in UAT.



find_real_file.png



The approval user activity looks like the below:



find_real_file.png



Thanks for your help so far, just wondering do you know where we are going wrong?   it looks to me like once the existing peer review is cancelled, that approval user activity is taking the cancelled state as an approved signal and then progressing along.



Edit - I have found that the below is noted in the activity log of the change request.



find_real_file.png



Cheers,


Brendan


Ok, I think I got it!



First of all, I hope someone much smarter than me has a more elegant solution. Actually, I don't think this solution is TOO terrible. Here goes.



Everything you have seems right except we need to tell the Approval activity (the one that is running through as Approved even when you roll back) not to consider "Skipped" as "Approved. To do that we have to edit the Workflow Condition. Locate your Approval workflow activity and click on the "Approved" condition.


find_real_file.png



Then, edit the condition line to say: activity.result == 'approved'



Finally, after the rollback, you have to set your State to something like Work in Progress. I find that the rollback and change in approvers is forcing my task state to be Requested, even if that's not a valid state.



Give it a whirl and you should be good to go! I tested the above steps in my instance and got this to work so you should have success with this method.



My instance:



First, the approver is Aada Larsen. I derived this from a field I created on my form called "Approver":


find_real_file.png



Then I change the approver to "Abel Tuter" on my form. I then manually executed the rollback via Background script:


find_real_file.png



Anf finally, in my task record, the approver is Abel Tuter:


find_real_file.png




I hope this helps! If so, mark the answer is helpful and set this post to Answered.



Good luck, Brendan!


Hey Jon,



Thank you so much for your help with this.   Your above solution has worked!   It seems pretty elegant to me, I'm not sure how else you would approach this



I didn't have to set the state to work in progress, it stays at the peer review state during the rollback.



Thanks again, I really appreciate it.



Cheers,


Brendan


Any time, dude!



7b6bc2c3f2a3ee36256f9373dabac1f1_-y-hang-loose-clip-art-hang-ten-clip-art_300-253.png


Shishir Srivast
Mega Sage

Hi Brendan,



You may find this thread helpful.



Change Approvers dynamically