RITM closed incomplete but task is open and showing cancelled error in workflow

snow_p
Tera Contributor

Hi All,

I have a requirement, where 3 tasks will be created at the same time. The condition is, if any one of the task is closed incomplete, the other two tasks also need to be closed incomplete and set the RITM to closed incomplete. If all the three is closed closed complete, then another task will be created. I have created the workflow using branch and join activity as shown below.

find_real_file.png

Upon, rejecting/closed incomplete of any one of the task, The RITM is set to closed incomplete (which is working fine) but tasks still showing open and showing this error

find_real_file.png

And,

Task is still showing open under RITM.

find_real_file.png

Any changes needed to workflow are any script changes ?

 

Thanks,

2 REPLIES 2

Allen Andreas
Administrator
Administrator

Hello,

You're not addressing the catalog tasks in your flow? Meaning...by set value, run script or anything. You're just addressing the RITM, so with that said, the tasks wouldn't just randomly get addressed and set to closed, etc.?

You'd need to consider using a run script activity to query the sc_task table, find the open/active sc_task(s) and then set the state value to the relevant value and update: https://developer.servicenow.com/dev.do#!/reference/api/paris/server/no-namespace/c_GlideRecordScope...

You'd do all of this before you set the RITM closed. So use a run script, then perhaps a timer activity of maybe 30 seconds to let the database be updated, then use the setValue for the RITM.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

@Allen Andreas 

Hey,

 

What about if you have a condition such as:

 

If it is a mix of sctasks, then:

If any are Closed Complete, then RITM and Request Closed Complete

Else RITM and Request Closed Incomplete