change workflow activity execution state

amaradiswamy
Kilo Sage

Hi All,

In my workflow join activity i forgot to change the condition activity.result == complete, my workflow designed as shown in screenshot

find_real_file.png

so, the condition didn't match in if activity and hence directly joined to JOin activity and so even task1, task2 completed, the workflow got struck as condition didn't match. so, i need to move the workflow to further steps. How can i do that?

I tried the below, it sets join activity status to finished but it is not going to next steps. Please advice.

var gr = new GlideRecord('wf_executing');

gr.addQuery('sys_id','sysidof thw activityfromcontext');

gr.query();

if(gr.next())

{

gr.state = 'finished';

gr.update();

}

Thanks and regards,

Swamy

11 REPLIES 11

Can you share a screenshot of those stuck workflows?




Telmo


here is the screen shot


find_real_file.png


If you close that two task manually, it will get forward. Right?



You can try that.


that is the issue naa, eventhough tasks were completed and in join as condition not matched, the workflow got struck at join only. Now, from backend i should move the workflow forward so that the next steps defined in the workflow will execute as defined.



Thanks and regards,


Swamy


why the below script is not working.........


  1. var gr = new GlideRecord('wf_executing');  
  2. gr.addQuery('sys_id','sysidof thw activityfromcontext');  
  3. gr.query();  
  4. if(gr.next())  
  5. {  
  6. gr.state = 'finished';  
  7. gr.update();  
  8. }