Why workflow Catalog tasks are not created when workflow run?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2018 03:11 PM
I have an issue on my instance where workflows are getting auto completed after approvals are set, can somebody help?
i.e:
I raised a RITM where should create a task to my IT team but after manager approves request workflow seems that goes into all activities it looks like all of them ran successfully, RITM is closed complete but the catalog task never was created.
- Labels:
-
Team Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2018 03:32 PM
Can you post the workflow context screenshot? Did it skip the catalog task creation?
Please mark this response as correct or helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2018 03:51 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2018 04:11 PM
Ok. You need to use a Wait for Condition to check if all the tasks are completed.
Add a Wait for condition to your workflow just before End. Wait for condition should point to End. And anything that is pointing to End should point to Wait for Condition.
Write a script on the wait for condition
var ctask = new GlideRecord('sc_task');
ctask.addQuery('request_item',current.sys_id);
ctask.addQuery('active',true);
ctask.query();
if (ctask.next())
{
answer = false;
}
else
{
answer = true;
}
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2018 06:39 PM
Just to add. I think you also need to update the current record (RITM) to trigger and validate the condition given in "wait for condition" activity. The workflow evaluates the Wait for condition activity each time the current record is updated