How do I Close RITM , once tasks are closed (RITM and tasks are created through script in Runscript activity).

Chinmayee1
Giga Contributor

After first RITM and its task is closed , I am creating another additional RITM with 5 tasks in a Runscript activity.Everything is fine but when I close all the tasks, it doesnt close the RITM . Which is working fine for the first RITM automatically  but its not doing the same for the tasks and its RITM which are created through script.Can anyone advise on how do I trigger RITM to close once all the tasks are closed??

5 REPLIES 5

bardakov
Tera Expert

You can create Business rule for task (sc_task)
with the condition of closing, check whether there are still open tasks (use GlideRecord), and if there are no such, and this is the last, to close RITM

Hi Victor, 

Thank you . yes there is already a business rule to close the RITM .Its workig fine when I transition task-complete to "set Values" activity . But in this case , I am creating task by script and not through catalog task activity. So I m not sure , how to transition it from a Runscript activity to trigger RITM closure , once the tasks are closed.

Business rules work regardless of your workflow

If you have multiple tasks associated with a single RITM
It is necessary to create a new business rule that will work every time when the task is closed, check if there are still open tasks, and if there are no such ones, then close RITM

In the workflow, it is not possible to track these actions

There is another way, also monitor the closing of the Tasks in the business rule, and, if necessary, fire event into the workflow in which to monitor it and go to the Activity "Run script", and so close the RITM. But it's easier to do it right away in the business rule