How to make RITM workflow wait for Request Approval in Order Guide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2019 09:00 AM
Hello,
I have an order guide that requires approval, which will be done in the sc_request workflow. Depending on what the user chooses, there could up to 3 RITMs that come out of this order guide. Each RITM has its own workflow. The problem i am having is how to make the RITMs workflow not run until the approval is complete in the Request workflow. Right now, as soon as i submit the order guide, the Request workflow is waiting for approval, but the RITMs start running through their workflows before the approval is granted. Do i need to put some kind of wait for condition at the beginning of the RITM workflows? Is it possible to get values from the Request workflow into the RITM workflow? Does anyone have any ideas of how i could handle this?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2019 11:41 AM
actually..nevermind, disregard that last question. I figured that out. My next problem is that the RITM is getting stuck on the wait condition. It wont move past this point. I have read that I have to update the RITM somehow, but not sure how to do that. Business rule? or can it be done in the workflow itself?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2019 07:29 AM
Do you mean the wait for condition stuck in RITM workflow after adding the above script? If yes, Request has to be approved for RITM workflow to proceed to next activity.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-29-2019 08:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2021 09:19 AM
It’s a workaround instead of configuring approval on Request level.
Lets say we have 2 RITMs under an Order guide, you want to run the approvals/not to set approvals of 2nd RITM based on first RITM.
Create a business rule to query the current request number in requested item table, condition = after update.
Sample :
var item1 = current.cat_item.getDisplayValue();
if (item == 'First item name where you want to put approval’)
{
var REQ = current.request.sys_id;
var stage = current.stage;
if(stage == 'fulfillment')
{
var item2 = new GlideRecord('sc_req_item');
item2.addQuery('request',REQ);
item2.addQuery('short_description','2nd item name, where ');
item2.query();
if(item2.next())
{
var number = item2.number;
item2.state = '168'; // it will set the 2nd RITM’s state into In progress
item2.update();
}
}
Now in 2nd RITM’s workflow, put a timer of your choice, and check for the condition (if state == ‘In progress), so once the first RITM will be approved, it will set the 2nd RITM state into In progress and hence your tasks will be triggered without asking for any approval.
So, in short you will have to approve your One RITM , and for rest of RITMs you can directly create catalog tasks.