Issue in approval
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2024 02:18 AM
Hi Team,
I am sending two approval's parallel to request item by using the flow designer(Do the fallowing parallel). Now I approved one approval, automatically second one going to the no longer required how to fix this kind of issue
Advance thanks Team.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2024 02:54 AM - edited 09-17-2024 02:55 AM
My requirement was to create parallel approvals on the basis of a list collector catalog variable. In other words, add a user to multiple groups and ask for approval from each of the group managers separately.
Unfortunately parallel approvals are not supported by flow designer. You might find some solutions by creating a catalog task and tick the „wait” box or use the „run in parallel” options, but with foreach these don’t work.
I managed to find one solution and share it with the community, maybe it’ll be useful for someone.
- I created a new script action that takes the records from the foreach action and add individual approvals one by one.
(function execute(inputs, outputs) { var approvalGR = new GlideRecord("sysapproval_approver"); approvalGR.initialize(); approvalGR.source_table = 'sc_req_item'; approvalGR.document_id = inputs.ritm; approvalGR.sysapproval = inputs.ritm; approvalGR.approval_column ="approval"; approvalGR.approval_journal_column ="approval_history"; approvalGR.approver = inputs.manager; approvalGR.state = "requested"; approvalGR.insert(); })(inputs, outputs);
2. Step 1 will create the parallel approvals, however the flow does not wait for the approval, so we need to look the approvals up OUTSIDE of the foreach loop
3. Then iterate through the approvals and
4. Add a wait for condition
f
Certainly! Here’s a framed version of the sentence:
For assistance with your issue, please refer to the link below.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0994747
Please mark this response as Correct and Helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2024 02:55 AM
Can you check the "Ask for Approval" action is in Any Approves or Rejects if it is you can change it to "All users Approve or Reject" If it is Helpful Mark it as helpful
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2024 03:14 AM - edited 09-17-2024 03:17 AM
Hello @Venky Kshatriy2,
Can you please find the below link and let me know whether it is useful or not.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0964016
https://www.servicenow.com/community/workflow-automation-articles/flow-designer-approvals-overview-w...
https://www.servicenow.com/community/itsm-forum/parallel-approvals-in-flow-designer-using-low-code-a...
Thanks
SP