- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2022 01:00 AM
Hello Team,
I have a requirement on service catalog, some are sctasks are created manually and workflow. while closing all associated sctask set to closed completed then the RITM should closed complete automatically.
Present this is not happens for manually created sctasks.
Please advice me if any.
BR
Raja Reddy V
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2022 01:22 AM - edited 11-07-2022 01:23 AM
You can write an after business rule on sc task table whenever the task is closed
CONDITIONS: state is one of closed complete|closed incomplete|closed skipped
Script:
var sctask = new GlideRecord("sc_task");
sctask.addActiveQuery();
sctask.addQuery("request_item", current.request_item);
sctask.query();
if (!sctask.hasNext()){
var req = new GlideRecord("sc_req_item");
req.get(current.request_item);
req.setValue("state", <value_of_closed_complete>);
req.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2022 01:22 AM - edited 11-07-2022 01:23 AM
You can write an after business rule on sc task table whenever the task is closed
CONDITIONS: state is one of closed complete|closed incomplete|closed skipped
Script:
var sctask = new GlideRecord("sc_task");
sctask.addActiveQuery();
sctask.addQuery("request_item", current.request_item);
sctask.query();
if (!sctask.hasNext()){
var req = new GlideRecord("sc_req_item");
req.get(current.request_item);
req.setValue("state", <value_of_closed_complete>);
req.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2022 08:10 AM
When we created manual/workflow multiple task system should check until closed complete all associate task.
Here, system not checking to wait all associate task get complete.
Could you please help me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2022 02:13 AM
Thanks for quick response. Its really helpful😄