Workflow is getting cancelled at the End Activity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2018 03:27 AM
Hi,
I have designed the workflow in which catalog tasks should generate parallel.
And I have added the wait for condition to check all the catalog Tasks are completed or not.
But My problem is The Workflow is getting cancelled at the End. Any Reasons.?
In the properties I have changed the maximum count activity to 200.But no luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2018 03:39 AM
Can you share your workflow, it's hard to tell when we can't see how you build the workflow.
Is the workflow canceled or finished?
The maximum count activity shouldn't matter in this case unless you have a loop going through the same actions over and over again or if you have a very large workflow.
You could use a wait for condition and make a script checking all tasks are closed before it goes on to the next stage.
This is an example we use (should probably use GlideAggregate instead of getRowCount for optimal performance).
//Set the variable 'answer' to true or false to indicate if the condition has been met or not.
var gr = new GlideRecord('sc_task');
gr.addQuery('request_item', current.getUniqueValue());
gr.addActiveQuery();
gr.query();
var count = gr.getRowCount();
if(count > 0)
answer = false;
else
answer = true;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-18-2018 03:40 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2020 01:08 AM
Good Solution Tanaji, Sometimes, wait for condition fails and Branch/Join works. Thanks for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2018 01:05 AM
Thank you.. I used the join activity after the catalog Task and it is working good.