Skip Workflow Activity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2017 06:43 AM
Hi,
I have an active workflow running and it is currently waiting at a Wait for Condition activity. Now I know the condition is not going to be met and I want to bypass this activity for the existing running workflows.
I am not concerned about the completed workflows (or) the workflows that are yet to start. I want to bypass an activity in the existing workflow and move the control to the next activity.
Please let me know if you have any ideas.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2017 06:46 AM
Hi Aswin,
Can you provide some details about what the activity is waiting for?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2017 06:52 AM
Hi Chuck,
The activity is a 'Wait for condition' activity that is going to wait until the State of the task becomes X. Now due to some reasons we have changed this X to Y.
This is not going to have an impact on the future workflows that gets attached. But for the existing running workflows, we do not have a option to change to condition to point it to Y.
So we just want to bypass this activity and move ahead

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2017 06:57 AM
I would trigger it manually from Scripts Background. Get the sys_id of the task and use a script similar to this: (Note, this is untested code and you will need to change the values and possibly field names to get it to work.)
var task = new GlideRecord('task');
if (task.get('SYS_ID_OF_YOUR_TASK_HERE')) {
task.state = X; // update to the value your waitfor condition is expecting
task.update();
}
That will update the record to the value and the workflow will move on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2017 07:01 AM
Thanks again Chuck. This is a workaround that I have.
But the State value of X is not available now so if I update X to the State value, my wait for condition would satisfy and move on but since the X is not there, the field value will not be proper