Create second task when first task is "closed complete."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 09:42 AM
Helo!
I have an ask to edit a workflow to create a second task when a first task is "closed complete." Please see attached screen shot. But the logic breaks. As is the task is always made, no matter what the closed condition of the first task is. If I flip the logic the task is never made, no matter what the closed condition of the first task is. What did I miss or am doing wrong?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2023 10:10 AM - edited 11-10-2023 10:13 AM
1) Set the wait for completion to true as suggested by @Sagar Pagar Sir and this is present in the catalog task, please open first catalog task and look into wait for completion
2) Add the script in the if condition
3) You can remove the wait for activity
var tskRec = new GlideRecord("sc_task");
tskRec.addQuery('request_item', current.sys_id);
tskRec.query();
if(tskRec.next()){
if(tskRec.state !=3)
answer = false;
else
answer = true;
}
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.