How to create a generic Group Approval workflow?

Sonal10
Kilo Expert

Hi Experts,

I am looking at creating a standard workflow which can take(say) a "Group name", and assign approvals to that group.

Basic requirement is that we have some upcoming requests that are owned & managed by different units in the Business.

So based on what is requested there will be separate group of people to approve the requests in Service Catalog.

Example:

Generic workflow with one fulfilment task, should send approval email to all the group members & anyone can approve.

1. Item ABC (Business Approvers: Mr.a, Mr.b and Ms.c)

Approval group name: Group_ABC_approvers

2. Item XYZ (Business Approvers: Mr.x and Ms.z)

Approval group name: Group_XYZ_approvers

How can I best pass the group name to the workflow? Should I create a new field on the catalog item, that captures approval group & use that?

Any other ways to achieve this?

Any advise on this will be much appreciated.

1 ACCEPTED SOLUTION

aswinsiddaling2
Kilo Guru

Hi Sonal,



The best way is to have a custom table which will contain the mapping between the catalog item and its approval group. You can then have a script in your workflow to call this table and get the approval group based on the catalog item.



You can use the same logic for the task provisioning as well



Thanks and Regards,


Aswin Siddalingam


View solution in original post

10 REPLIES 10

Thanks Aswin,


I managed to apply this logic with the help of our consultants (as they advised this would be the best approach)



Regards,


Sonal


Bro can you please give me example and code what we have to write in workflows..tag some screenshots..it's urgent

dianemiro
Kilo Sage

Hi Sonal,



I think you're looking at this solution:



Add a Approval - Group core activities and put the Assignment Groups under Approvers then on the Condition for approval put The first response from any group. Please see below:



find_real_file.png


Hi Diane,



Yes pretty much on the same lines, just that I am not sure of how many groups will surface in the near future.


I will try your solution & if it can take up to 15-20 groups, my job will be done!


However I will not know about the groups yet, they will be requested as and when they are ready to launch their items in the catalog (if you can see what I mean).



In the mean time can you think of a script /syntax to set the approval group from a field/variable?


example:


find_real_file.png


Siddartha Gudim
Tera Guru

To send the approval to group using script use the following


var group = current.*** //group to which approval has to be sent  


var answer =[];


answer.push(group.toString());




if the approver group is in variables of catalog item then use



var group = current.variables.***


var answer =[];


answer.push(group.toString());



I hope this helps



Like or Mark Correct based on the impact of response.