How to generate a task after one of the previous tasks is closed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2022 11:54 AM
Hi all,
I have a workflow that generates two tasks simultaneously - SER Task and EMP Task. The next task generated to XYZ team is only when both SER and EMP tasks are closed. Please find the screenshot attached.
I am trying to tweak my workflow a bit and need the task generated to XYZ team to happen only and only if EMP task is closed complete irrespective of weather the SER task is open or closed complete.
How can I achieve this?
I have also attached the screenshot of the If condition in the second screenshot.
Thanks,
Mallika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2022 10:05 PM
Hi ,
Add wait for condition before join and check if all the task are closed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2022 10:20 AM
Hi
Can you please let me know the script I need to add to the 'Wait for' condition?
I am currently using this script -
var tasks = new GlideRecord('sc_task');
tasks.addQuery('request_item', current.sys_id);
tasks.query();
if(tasks.next()){
if(tasks.state == 3){
answer = true;
}
else{
answer = false;
}
}
else {
answer = false;
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2022 10:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2022 11:02 AM
All the tasks have Wait for completion checkbox ticked. However, I am trying to tweak my workflow to generate the task to XYZ team as soon as EMP Task is closed.
I do not want to wait to close both SER and EMP tasks and then generate a new task.
Thanks,
Mallika