Workflow wait for condition struck at running?

sukran
Mega Sage

Wait for condition met satisfied but it not move forward

( Workflow configured in request table)

 

var gt = new GlideRecord('consume_asset_task');
gt.addQuery('u_request' , current.sys_id);
gt.addQuery('stateIN3,4,7'); // closed completed . closed incompleted , closed skipped
gt.query();
if(gt.next()){
answer = true;
}
else{
    answer=false;
}
 
Workflow 
 
sukran_1-1719247129467.png

 

Task 

 

sukran_2-1719247171189.png

 


 

2 REPLIES 2

Yashsvi
Kilo Sage

Hi @sukran,

please check below link:

https://www.servicenow.com/community/developer-forum/wait-for-condition-is-not-proceeding-with-the-w...

Thank you, please make helpful if you accept the solution.

James Chun
Kilo Patron

Hi @sukran,

 

When does the [consume_asset_task] state change occur?

Does it happen after the Wait for condition is executed or before?

 

If it's after, unless you apply an update to the current record (Request record), the Wait for condition will not be evaluated again.

 

Cheers