- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2017 02:10 AM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2017 02:36 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2017 02:22 AM
Hi Sonal,
This can be achieved by creating a generic group approval workflow and call it in the catalog item workflow when needed.
For calling a workflow in another workflow, the better approach is subflow only. We can pass values to the subflow from the main flow using creating variable by Edit Inputs and passing the scratchpad variable there.
Using Subflows - ServiceNow Wiki
Since it is not available for you, I think you can make use of workflow script for this. Check the link below
Workflow Script - ServiceNow Wiki
Please like or mark correct based on the impact of the response.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2017 03:36 AM
Thanks Siddhartha, I am not too sure if it needs to be so complicated.
What I am actually looking for is, may be, a script to set the group name within the workflow Approval activity activity. (see the screenshot below).
I want to be able to pass a group name dynamically, based on the catalogue item.
Can the group name be set from the script either from a variable or a field on the Catalogue item?
As an example: I would do this if i wanted to set up a project manager of a selected project on the Catalogue form.
answer = current.variables.project_man.user_name.toString();
Does that help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2017 02:36 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2017 03:40 AM
Thanks Aswin, appreciate your suggestion.
TBH, I am not a hardcore developer, just picked up from all the assistance available here in the community & wiki.
So - I would actually resort for something simpler, but I will definitely consider this in the long run.