Flow designer - wait for condition
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2024 11:56 PM
I created a flow and a 'wait for condition' that waits for all catalog tasks created dinamicaly (for any CIs from a list) in the flow to be closed before closing the RITM. The flow doesn't pass the wait for condition because even after I closed all the tasks, the ritm is still open.
var reqItem = fd_data.trigger.request_item.sys_id;
var gr = new GlideRecord("sc_task");
gr.addEncodedQuery("state!=3^request_item=" + reqItem);
gr.query();
gs.info("flow designer row count: " + gr.getRowCount());
if(gr.getRowCount() > 0){
answer = false;
}
else{
answer = true;
}
return answer;
0 REPLIES 0