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,,

I modified the state to 3 and it is working now as expected.

But my concern is now I disabled your script and checked for Single Task when I closed the Task, RITM as well as Request are getting Closed Complete. Even though the Script(business rules) are inactive.

 

find_real_file.png

find_real_file.png

Can you please let me know how to fix it?

 

What do you want to fix? I guess it is correct when they are closing.

Maybe you have workflows running which is responsible for closing.

Hi i have some doubt regarding this can u plzz help?

 

Ameet Patel
Tera Contributor

The main problem on using BR to close RITM and REQ is if there are sub sequential sc_tasks which are fired based on last sc task state than it will mark the RITM and REQ closed complete. I am facing similar issue and it won't work. Its better to set the stage in workflow or flow at last step so OOB code will handle closing RITM and REQ. But again it will only mark it closed complete. I have a request from stakeholder where if any one sctask is marked incomplete than it needs to mark ritm and req incomplete. Still trying to figure out easy way as we have over 100 workflow and 56 flow which i will have to implement logic to.... If anyone comes up with easy solution let me know 

 

thx