Configuring a flow to check for a condition on one record in a bunch of looked up records

Pandachan
Tera Contributor

I've got a requirement where if a scrum task is completed with a test result of fail, that it looks up the other scrum tasks that have not yet been completed for that story and sets them to cancelled, but if all scrum tasks come back as pass, that the flow continues on.

 

The way I'm attempting to do this is with a flow triggered by a state change on a Story, and in the flow, I'm looking up Scrum Tasks associated with this Story. I'm looking up all Scrum Tasks that are not yet complete, and waiting for condition of 'Complete'. I'm then checking if the test result is fail, and then looking up all Scrum Tasks that are not yet complete, and setting them to 'Cancelled'.

 

The first time I tried this, it worked perfectly fine. But the second time I tried this, it didn't. I discovered that the first time I tried it, it worked because I managed to fail the very first record that the lookup was finding. The second time I tried it, I failed the last record that the lookup was finding. The flow itself was stuck waiting for the very first record to be 'Complete' before it moved on to the next record.

 

How can I get round this? There's no way of knowing which Scrum Task will be completed and passed/failed before any of the others. I just want to make sure that when one is failed, that all other Scrum Tasks are cancelled.

Here's the overview of this section:

Pandachan_0-1730280798289.png

 

Section 3's wait for condition expanded:

Pandachan_1-1730280846386.png

 

0 REPLIES 0