WF hanging at Wait Condition

A_Nelson
Kilo Expert

Hello!

In my Workflow, I am waiting for a change task (created via a create a task activity) to be completed. For some reason the check box "wait for completion" is causing the activity to hang even after the task is completed. I assume this is due to the heavy scripting involved in the activity itself. To try and get around this, I have unchecked the box and made a wait condition with the below script. This too is failing to move forward once the change task is completed. I have verified that the query is working by setting values from the query. Any suggestions on why this is failing? Thanks!

 

var gr = new GlideRecord('change_task');
gr.addQuery('change_request', current.u_change_request); // this matches the change request to the one listed in the RITM
gr.query();
while(gr.next()){
if(gr.state == 3 || gr.state == 4){
answer = true;

}}

5 REPLIES 5

I entered that and it is still not continuing past the wait condition. If I save the RITM it proceeds but for some reason the business rule is not firing off when a change it made to the change_task table.

The BR is ruinning after insert, update, or delete and it is on the change_task table.