Order Guide - Start the second RITM only after first RITM is completed

NamrataJain
Tera Expert

Hi All,

I have a requirement where in the order guide after ordering two ritms are generated and customer wants that RITM "xyz" is opened/initiated only when RITM "abc" is closed completed.

Is this requirement doable? Has anyone come across such requirements.

Any help would be appreciated.

Thank you.

1 ACCEPTED SOLUTION

Kannan Nadar
Tera Guru

Hi Namrata,



Yes, we had such requirements. I hope that there are separate workflows for each of the RITM. In the second RITM workflow, after the Begin add a "wait for condition" to check if the previous RITM is completed. Now to trigger this wait for condition you would need to create a BR which will run on closure of your first RITM. Your BR should simply updated your second RITM with some comments.


View solution in original post

9 REPLIES 9

Kannan Nadar
Tera Guru

Hi Namrata,



Yes, we had such requirements. I hope that there are separate workflows for each of the RITM. In the second RITM workflow, after the Begin add a "wait for condition" to check if the previous RITM is completed. Now to trigger this wait for condition you would need to create a BR which will run on closure of your first RITM. Your BR should simply updated your second RITM with some comments.


Hi Kannan,



Could you share your BR with me, if possible?



Thank you.


I dont have it now, it was a part of my previous organisation. But i created one similar to that.



Below is the condition. Replace the catalog item name in this.


find_real_file.png



Below is the script in it. Replace the Sys Id of the catalog item with the catalog item sys id of the second RITM.



(function executeRule(current, previous /*null when async*/) {




// Add your code here


var gr = new GlideRecord('sc_req_item');


gr.addQuery('request',current.request);


gr.addQuery('item','SYS_ID_OF_CATALOG_ITEM');


gr.query();


if(gr.next())


{


gr.comments = current.number+' is closed';


gr.update();


}


})(current, previous);


Hi,

Can you share how did you configured the Wait for condition? I have the same requirements as this.

I'll appreciate your response. Thanks.

Diane