Tips on script to match RITM state with SCTASK state

Ear19
Giga Expert

Does anyone have any tips and tricks to share on matching RITM state with SCTASKS?  We have been tasks to match states: 

If any ' closed incomplete' sctasks then the ritm is 'closed incomplete'.

If any 'work in progress', 'pending' states then the ritm is 'work in progress'.

If tasks are 'closed complete' or 'closed skipped' then ritm is 'closed complete'.

The issue is how to handle the times when a sctasks are one of many such as a ritm that has sctasks with the states 'closed complete', 'closed incomplete' and/or 'work in progress', 'pending' at the same time. 

There are so many different scenarios that these SCTASKS states COULD fall into we want to be able to cover everything?  Does this mean we would have to define a matrix to map everything out and write a script from that?  

1 REPLY 1

Allen Andreas
Administrator
Administrator

Hi,

I'm not sure fully what you're trying to do. The catalog tasks and Requested Items have the same states?

The request item is really a separate process from the catalog task as any given RITM can have many 2 or more tasks.

For the most part the RITM is "work in progress" once a task or tasks are issued and then depending on the completion of that or those tasks the RITM is then Closed (as either Completed, Incomplete, or Skipped).

Each workflow is different, but in that workflow, you can evaluate the result of the catalog task and if there was only 1 task associated to a RITM and that task was "Closed Skipped", then you can simply map that value to the RITM as Closed Skipped (they both use the same task values for each state).

So it all depends on the workflow...if say a RITM has 2 tasks and task 1 isn't necessarily something that matters and could be skipped (maybe that step is needed to check, but ultimately they don't have to do anything), but the second task is crucial to the flow, and that one is closed complete. You'd set the workflow to set the RITM state based off that...and not the first task.

So again, it all depends on each flow and the meaning behind it all. I don't think there's 1 simple solution to map the values unless all the workflows were the same (and if that was the case you'd have just 1 workflow for 100 items).

It's about your company and what you all are trying to do.

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


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