How to create Approval Sub Flow with a script in Flow Designer?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2022 04:10 PM
I'm trying to convert my Workflows to Flow Designer and I want to use Sub Flows for repeatable actions.
In most of our Service Catalog workflows, we require departmental approval before we fulfill the request. Since the approval is based on who requested the item and what department they are in, we have added a script to the workflow approval step. I cannot figure out how to do that in Flow Designer and would like some help.
Our Workflow approval step looks like this:
How do I translate the above into this? I don't see how I can add the approval group and the script with Flow Designer. And I do want it to be a sub flow so I don't need to add the same steps to multiple flows.
- Labels:
-
Flow Designer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2022 07:33 PM
Hi
you can trigger flow from workflow run script
Refer below link for help
Scripting with Flows, Subflows, and Actions
// Map inputs. For a flow with a record trigger, inputs are the record and table
var inputs = {};
inputs['current'] = current; // GlideRecord of table:
inputs['table_name'] = 'incident';
// Execute the global flow called test_flow
sn_fd.FlowAPI.executeFlow('global.test_flow', inputs);
Learn more about subflows:
https://docs.servicenow.com/bundle/sandiego-servicenow-platform/page/administer/flow-designer/task/create-subflow.html
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2022 01:44 PM
Sandeep,
Thanks for the answer but I am still unsure what I need to do and would appreciate more help. I have done the exercises from the link you provided, thanks for providing it, it was very helpful.
How would you create a repeatable action/flow/subflow with this business requirements?
More than one person in a department can approve a catalog item if they have the custom approver role. The approver may only approve RITMs that are associated to their department.
Most catalog items require departmental approval.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2022 07:40 AM
Could you try to add a script step before the ask for approval step and in the script pass back the approver list in an output variables?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2022 02:25 PM