change workflow activity execution state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2016 01:57 AM
Hi All,
In my workflow join activity i forgot to change the condition activity.result == complete, my workflow designed as shown in screenshot
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2016 03:11 AM
Can you share a screenshot of those stuck workflows?
Telmo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2016 03:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2016 03:49 AM
If you close that two task manually, it will get forward. Right?
You can try that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2016 03:57 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2016 06:26 AM
why the below script is not working.........
- var gr = new GlideRecord('wf_executing');
- gr.addQuery('sys_id','sysidof thw activityfromcontext');
- gr.query();
- if(gr.next())
- {
- gr.state = 'finished';
- gr.update();
- }