Hello Powerautomate Community,
I have a question how to elegantly stop a flow when the subflow passes an error. For example, I have a flow, and it calls a subflow A and in subflow A i call subflow B. In subflow B happens an error, how can I tell the subflow A about it and the flow about A, they should cancel the process?
Because if i don't say Subflow A and the Mainflow should terminate, both are repeating the flow until a timeout occur.
Hi @shun88
You can use scope action and add all other actions in it to catch any error in the child flow. In case of error, you may return the status as 'failed' or some text to notify that it has failed. In the parent flow, you can test the status returned by child flow and accordingly terminate the parent flow based on the status field.
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
Thanks