Flow Designer Approvals on Request approve all RITMs on first approval
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 10:34 AM
We are trying to convert a Workflow to a Flow Design. The Workflow approves at the sc_request level. Depending on the department and the Requested For’s position in the organization there may be several tiers of approval.
The problem is the Request approves all the related RITMs on the first approval before it completes the flow.
We have tried the following work around without success
Requirement: all approvals should be complete before the RITM(s) are approved and fire off their first sctask.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 07:38 PM
Hello @Amy McManigle,
- Create a Flow: Begin by creating a new flow in Flow Designer.
- Add the "Ask for Approval" Action: Include the "Ask for Approval" action in your flow.
- Configure Approval for the Main Request: Set the "Record to Approve" to the main request record (e.g., RITM or INC).
- Define Approval Rules: This is the key step. You'll need to define a rule that automatically approves all related ROOM records when the main request is approved.
- Use a Script: Create a script within the "Ask for Approval" action's rules section.
- Script Logic: The script should:
- Identify the related ROOM records based on a relationship field (e.g., a foreign key on the ROOM table pointing to the main request).
- Iterate through these related ROOM records.
- For each ROOM record, update its approval state to "Approved" or a similar state that indicates approval.
- Identify the related ROOM records based on a relationship field (e.g., a foreign key on the ROOM table pointing to the main request).
- Example Script (Illustrative):
- Use a Script: Create a script within the "Ask for Approval" action's rules section.
var room_records = new GlideRecord('room_table'); // Replace 'room_table' with the actual table name
room_records.addQuery('parent', current.sys_id); // Assuming 'parent' is the field linking ROOMs to the request
room_records.query();
while (room_records.next()) {
room_records.updateApprovalState('Approved'); // Replace 'Approved' with your desired approval state
room_records.update();
}
- Configure Approver and Due Date: Set the approver (user or group) and an optional due date for the main request approval.
- Handle Approval Outcomes: Use "Flow Logic" (If/Then) to handle the approval outcome of the main request. If the main request is approved, the script will automatically approve all related ROOM records.
- Save and Activate: Save and activate your flow.
-
Approval Flow:When a user submits a catalog item, a RITM is created, and an approval workflow may be initiated.
-
Approval Completion:Approvals are typically configured to require specific users or groups to approve the RITM before it can move forward.
-
Triggering SCTASKs:Once all required approvals are obtained, the RITM moves to an approved state, which can trigger the creation of the first SCTASK.
-
Why Complete Approvals First:
- Governance: Ensures that requests are reviewed and authorized by the appropriate parties before work begins.
- Accuracy: Reduces the risk of errors or incorrect fulfillment by verifying that the request aligns with organizational standards and policies.
- Compliance: Helps organizations meet compliance requirements by ensuring that all approvals are properly documented.
If this is helpful, please hit the thumbs up button and accept the correct solution by referring to this solution in future, it will be helpful to them.
Thanks & Regards,
Abbas Shaik