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

Hi Diane, 

 

Were you able to achieve the wait for condition?

Please let me know.

 

Thanks,

Amarjeet Pal

Hello Kannan ,

 

Can you please share the code you have written. It will be really helpful.

 

Thanks,

Amarjeet Pal

Hey,

It was something like below.

var gr = new GlideRecord('sc_req_item');
gr.addQuery('request',current.request);
gr.addQuery('item','SYS_ID_OF_PREVIOUS_CATALOG_ITEM'); //The Catalog item you are waiting for to be completed
gr.addQuery('state',3); //Closed State
gr.query();
return gr.hasNext();

Hi Kannan , 

In my requirement i had one master workflow for 5 catalog item of the order guide, how can i manage to trigger second ritm once fisrt ritm is completed. Can u please expalain?

Thanks 

Pathan .k

gauravbansal
Tera Contributor

Please refer "Configure a sequence to fulfill items in order guides".

https://www.servicenow.com/docs/bundle/vancouver-servicenow-platform/page/product/service-catalog-ma...