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,

There were 3 tasks in total,

One I had manually closed it, which opened two catalog tasks.

I then moved the RITM state to "Closed Incomplete".

3 woknotes got updated. Even for the closed task work notes got updated.

Vaishnavi35_0-1686588109611.png

 

 

Vaishnavi35_1-1686578002107.png

 

Vaishnavi35_2-1686578018226.png

when I open the Task record , the state is "Closed Incomplete" but when I see in the list view its "Work In progress", even in the activity its overlapping.

Vaishnavi35_0-1686584008088.png

 

 

Vaishnavi35_4-1686578304272.png

 

Help?

 

Thanks,

Vaishnavi

 

For the list view one, if you are able see it on form and not on list then just refresh the page or list it will get reflected. 

Its just when an update is being done on a record, the list needs to be refreshed to reflect the changes. 

 

for multiple worknotes coming , it might be due to the business rule which is running to closed all the sc task associated with a RITM. Can you please share the condition of business rule and script. 

Hi,

I just updated the worknotes, it got updated twice for each task.

 

Vaishnavi35_0-1686661123417.png

 

Vaishnavi35_1-1686661164423.png

 

Thanks,

Vaishnavi

a small change in script , i have add a query that it should run for active records. Try this. 

And i will check for one thing in my PDI. I hope this add on should resolve your issue.

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

Thank you for the help. It did workout, but there is another issue.

the state values are changed from open -> Closed Complete -> Closed Incomplete

Vaishnavi35_0-1686678510887.png

Vaishnavi35_1-1686679021733.png

 

The task is opened, I moved the RITM state to "Closed Incomplete", so why in the activity we see "Closed Complete" here? Because I did not update to closed complete.

The activity log is same for all the 3 tasks.

 

Thanks,

Vaishnavi