Once all the Tasks are closed, RITM and request wil close automatically

SNOW46
Tera Contributor

Hi All,

I want to configure one script for Service Catalog. When all the Tasks are closed, then corresponding RITM as well as Request will get closed automatically.

Incase of any RITM if there is only single task then once the TASK is closed, then RITM State will be updated to Closed Complete as well as Request will also gets closed.

On the another hand, incase of any RITM if there are any multiple TASK generated, then till all the TASK are not closed the RITM state will not change to Closed Complete or get closed.

After all the TASK are closed, the RITM as well as Request will also get Closed.

 

Can anyone let me know how to achieve this requirement.

 

Thanks,

SNOW@Das

18 REPLIES 18

Hi Slawek,

Can you please send me one screenshot like how to define this Business Rule and what will be the advanced conditions for the same.

Does the script work for me?

 

 

Thanks,

SNOW@Das

 

To create BR go to sc_task table and right click on top then choose Business Rules

find_real_file.png

 

After that press NEW.

Use condition current.state.changes() && current.state==6

find_real_file.png

 

 

 

 

Hi Slawek,

 

Good Day!!!

 

Actually I have one doubt here that the code given by you should be declared on Task Table. And once Task is closed respective RITM will get closed complete. But my concern what is about the corresponding Request, whether it will also be set to Closed Complete or how will it work for me?

 

Can you please let me know?

And also I want to know if there is only Task created for RITM, then upon closure of TASK corresponding RITM as well as Request will also be set to Closed Complete.

 

Thanks in Advance,

SNOW@Das

Yes it has to be on sc_task level because you close task and then rules and\or workflows close the rest.

Have you tried the code? 

 

Nope before trying it I just thought of asking you so that I would be clear.

And is it going to work for single TASK as well?