Best Approach for Multiple Approvals in 1 Request

win b
Mega Guru

Hi can you help me on this. I got a task where i need to create a request that needed to approved the modules i selected and on every  modules i select there will be a 2 approvals going to happen in every module. 

for example:


ProblemManagement:
1st Approver: Abel Tuter
2nd Approver: Abraham Lincoln
Change Management:
1st Approver: Andrew Och
2nd Approver: Adam Haro

(here is the sample modules were i selected)

winb_0-1668499321382.png

The flow would be first is the request to be approved by manager of the requestor of the request then when the request is have been approved the first approvers on each module would appear in my approvers table below the request. Then the approvers cannot go to the 2nd approver unless all of the 1st approvers approved the request. 

 

(here is the example should be but in my case i think theres something missing in my WF or im doing it wrong.)

winb_1-1668499990426.png

(here is my workflow but its not yet completed i lack on something)

winb_2-1668500087596.png

 

1 ACCEPTED SOLUTION

win b
Mega Guru

I found the right solution on my request. The Requirements seems to change a bit but i got it now. 

winb_1-1669598491987.png

 

winb_0-1669598432703.png

 

View solution in original post

6 REPLIES 6

Brad Bowman
Kilo Patron
Kilo Patron

Try this without the Approval Coordinator first, so after you set the Approval Status back to Requested have a user or group approval activity that has a script - if module 1 is selected, then add approver 1 user or group, if module 2 is selected, then add approver 1 user or group,... with the drop-down selection to wait for all approvers.  Then you would have another user or group approval activity following this one that does the same thing for the 2nd approvers.

can you provide a sample on this ?

I thought you might have already had the logic for your example.  If you have this configured that each module is a checkbox variable, then your script to add the corresponding 1st approvers would look something like this on a user approval activity:

if (current.variables.v_prob_mgmt == 'true') {
	answer.push('62826bf03710200044e0bfc8bcbe5df1'); // Abel Tuter
}
if (current.variables.v_inc_mgmt == 'true') {
	answer.push('12346bf03710200044e0bfc8b1234567'); // Bob Roberts
}
...

Where v_prob_mgmt... is your variable name.  If you are using groups, the script in the group approval activity would be similar, instead using the sys_id of the group instead of the user.

BradBowman_0-1668521792680.png

BradBowman_1-1668521856845.png

 

 

i tried it and use this kind of method but still triggers all even tho i select only 3

winb_0-1668524513154.pngwinb_1-1668524558039.pngwinb_2-1668524590089.pngwinb_3-1668524632529.png