Catalog item Workflow issues. RITM gets closed automatically when the form is submitted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 05:49 AM
Hi ,
I have a workflow created.
The RITM state automatically gets closed.
There are two catalog tasks getting created when a specific condition is selected. Even the tasks are getting opened in Closed Incomplete state.
Wait for condition code, if its correct?
// 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.sys_id );
gr.addQuery("active", true);
gr.query();
if (gr.hasNext()) {
answer = false;
}
else{
answer = true;
}
Please help?
Thanks,
Vaishnavi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 09:03 AM
When you use "show workflow" on one of the items, does it look like it is moving through your wait condition?
It doesn't look like there is anything wrong with your wait condition, but I'm curious why you are using one to begin with? Normally I'd say just make sure each task has Wait for Completion checked and use a join where you have the wait - the join won't move forward until all of the active paths have reached it.
It also looks like you have "create new my learning" going down the path that auto closes the request so that may be part of your issue.
Michael D. Jones
Proud member of the GlideFast Consulting Team!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 09:17 AM
Hello @Vaishnavi35 ,
Please share screen shot of your runned workflow through 'show workflow' I can check exact issue.
Instaed of wait for condition activity use join activity it will wait to proceed further until both the branches reaches it.
Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2023 09:18 AM
Hello @Vaishnavi35 ,
try this
in your catalog task activity just check this check box to true "wait for completion" .
And remove the wait for condition and connect the line to set values directly
Hope this helps
Mark the answer correct if this helps you
Thanks