Check State of previous tasks in flow

Nico12
Mega Sage

Hi,

I have a flow that will update and close a task (task number 3) automatically based on several conditions. The flow update automatically an asset and then close the task.

I need to check from that flow the states of the previous tasks (tasks number 1 and 2).

If at least one previous task has the state "closed incomplete" or "closed skipped", the flow should change the state of the task 3 to "closed skipped" and not update the asset.

 

How to check the state of previous tasks from the same RITM from flow  i didn't find it ?

 

Here is my trigger :

find_real_file.png

1 ACCEPTED SOLUTION

MrMuhammad
Giga Sage

Hi Nico, 

if those tasks are being generated by the same flow then you can just reference it using the data pills available on the right of the screen. 

If these tasks are not part of the current flow then you use the lookup records the action on table sc_task and find the tasks by referencing the requested item and then you can use data pills to get the state values and use it for your purpose.

Regards,

Muhammad

Regards,
Muhammad

View solution in original post

5 REPLIES 5

MrMuhammad
Giga Sage

Hi Nico, 

if those tasks are being generated by the same flow then you can just reference it using the data pills available on the right of the screen. 

If these tasks are not part of the current flow then you use the lookup records the action on table sc_task and find the tasks by referencing the requested item and then you can use data pills to get the state values and use it for your purpose.

Regards,

Muhammad

Regards,
Muhammad

Hi Muhammad,

Thanks for the reply.

Well i put a lookup records action like you told me and i am able to get therequest item.

But after that, i don't know how to add a condition if state of the task 1 or 2 = closed skipped

find_real_file.png

 

Regards,

OlaN
Giga Sage
Giga Sage

Hi,

By performing a Lookup records action, you can find and iterate through the other tasks.

You have the SCTASK by the trigger, lookup the other SCTASKs by do a lookup on the sc_task table, on all records that have the same parent RITM as the trigger record.

Hi Olan,

Thanks for the reply. Like i replied to Muhammad, i added the lookup records action but i can't find where to put my condition ( if state of task 1 or 2 = closed skipped).

Regards,