My flow runs well, no problem. However, it bothers me that I get emails telling me that my flow failed which actually means that the condition wasn't met, thus it didn't proceed to the "If yes" branch. I want to be able to add a terminate control with "successfully" terminated so I know that the flow worked as it should have rather than it telling me that it failed.
The reason why I can't add the "terminate" control is because of "Apply to each". Is there a workaround? Here is a screenshot of my flow:
Solved! Go to Solution.
Is that the notification email you getting? Generally you only get when flow fails? I did tested a similar IF condition and flow ran successfully. You could try declare a variable outside the loop and set some value inside the no condition. Lets see whether that helps or not.
@abm , thank you for your reply. What I get is a summary of all flows that "failed". Technically they didn't, but the flow counts them as such because I can't add the "terminate- cancelled" option.
To clarify, the flow does run successfully. That's not the issue.
The issue is that I only want the flow history to say that a flow failed when it truly fails.
Also, can you give me an example of what you mean by "declaring a variable outside the loop and setting some value inside the no condition"?
Thanks for your reply. What I was thinking is currently you don't have any actions under the No branch. So is that means when flow gets executed and IF condition doesn't satisfy the Yes condition there is No action steps to execute. Not sure that is triggering as a failure or not. Under the No condition you could set a dummy value, yes that is not going to do any other business logic but at least flow will execute always an action for the NO conditions hence I suggested the variable technique.
@abm , I think I understand where you are going with it, but I don't know what a dummy variable would look like. Would you be able to provide a screenshot of what that would look like?
Yes, I don't have anything in the NO branch because it wasn't allowing me to add the terminate function. This is what it tells me when I attempt to add the terminate function.
Look carefully what I suggested under the No. It's called Set Variable. Not initialise again. You already initialised the variable. Search for Set Variable.
I think you are looking at this the wrong way. There is nothing wrong with having nothing in the "No" branch and that will not trigger a failure.
I think you are actually experiencing a failure. Most probably in your condition, more than likely in the date comparison. If not it will be in the subsequent apply to each.
You believe it is working because the initial iterations of the loop ARE working, but I suspect some are not. I would add a compose step right before your condition which contains the value on the left side of your condition, then when you get a failure it will be obvious why it occurred (most likely an invalid comparison).
If you do want to put something in the no branch, you can simply put a compose in there with a random string like "no branch was selected". It won't actually do anything, but it might help your troubleshooting
@abm Nevermind, I think that fixed it! I just need to wait to see if I would get those summary emails with failed flows 😄
Thank you for your time!
Many congratulations to the Season 1 2021 Flownaut Crew!
Check out our new profile badges recognizing authored solutions!
Check out the community blog page where you can find valuable learning material from community and product team members!