Issues with close of RITM's and Catalog Tasks

Vaishnavi35
Tera Guru

Hi,

1. When Tasks are closed, RITM is not getting closed. (RITM should close once the Catalog Task is closed)
2. When RITM is cancelled/closed Tasks should cancel or close . Approvals No longer required.

Vaishnavi35_0-1687518970924.png

Code does not work. The Tasks are getting closed just fine but the RITM state automatically moves to "Closed Incomplete" though I am marking it as Closed Complete , once the form reloads it moving to closed incomplete. Not sure why.

3. Once the RITM is closed REQ is not getting closed and still "Active".

 

Please help me fix this issue!

 

Thanks,

Vaishnavi

1 ACCEPTED SOLUTION

This happening because your workflow is attached to the RITM and it is still going to proceed with the flow. There is only one functionality which cancel the workflow upon ritm cancelation. 

If you close complete the RITM and there is still few activities in the workflow to be executed. it will execute that. 

 

Make sure to close RITM upon completion of Workflow. you can do one thing before this activity. You can put a if statement and check if RITM is closed complete or not and according proceed the flow.

 

Please mark it Correct if it resolves your query.

View solution in original post

24 REPLIES 24

Hi,

Thank you. I will definitely check and get back here.

When the RITM state is moved to "closed complete", the catalog task state still stays in "Open" state.

The catalog tasks are created via workflow for all the catalog items.

 

That is where the issue lies, the "service desk" is directly closing the RITM after doing their job but the catalog tasks are still open in the RITM.

 

Thanks,

Vaishnavi

 

 

In that case you can have a after business rule on RITM table which will run when state is moved to closed or closed incomplete and will close all the task related to RITM. 

Below is the sample script : 

var catTask = new GlideRecord('sc_task');
catTask.addQuery('request_item', current.sys_id);
catTask.query();
while (catTask.next()) {
    catTask.state = '3';
    catTask.work_notes = "Closing Task as RITM is closed';
   catTask.update();
}

 

Although it is not recommended to close ritm by service desk, as per process they should close task related to them. but this should able to cover your requirements.

 

You are absolutely right that service desk should not do it. But it is happening most of the times and when we are pulling a report we see many tasks open but the RITM's are closed.

 

Thank you for the help. I will test and let you know.

Hi,

 

The worknotes are getting updated twice for each task.

Vaishnavi35_0-1686332563467.png

How to stop that?

Thanks,

Vaishnavi

can you share the whole screenshot once