Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

RITM should start only after another RITM is closed complete

TEJAS
Tera Contributor

I have a order guide in which when a request is raised it will create 5 RITMs ( 5 different catalog item and 5 different flow designer) my requirement is 

test 1, test 2, test 3 , test 4 catalog item ritm should be finish until then test 5 catalog item RITM should be on pause.
Is this doable , if it is how can we achieve .
Thanks in advance 

4 REPLIES 4

Community Alums
Not applicable

Hi @TEJAS  ,

You can refer to this article on how to implement:

https://servicenowguru.com/system-definition/order-request-items-order-guide/

 

This is a sample code which i have used in past where i had a requirement of starting 2nd RITM when the first gets completed:

var gr = new GlideRecord('sc_req_item');
gr.addQuery('request', current.request);
gr.addQuery('cat_item', "99fb579bdbbb73401e49f9051d96191f");
gr.addQuery('state',4);
gr.query();
gs.log(" For RITM " +current.number +" the ROW Count is " +gr.getRowCount() );
if(gr.getRowCount() == '1'){
	answer = true;
}

 

 

Community Alums
Not applicable

Hi @TEJAS  ,

 

TEJAS
Tera Contributor

@Community Alums ,
Thank you for the response 
This can be done using flow designer 

Community Alums
Not applicable

Yes indeed you can use flow to accomplise this.

@TEJAS