- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-20-2022 12:50 AM
I am searching for a method to stop a main flow from further exections in case a subflow arrives at a certain step. I don't really want to create the overhead of returning a status code and checking it via if statement in the main flow.
Is there any way to end a subflow in a way that will trigger error handling in the main flow?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2022 11:20 PM
I've now solved this by creating a custom action which thorws and error message I put into it. This will then be caught in the subflow error handler to do further actions. After these actions I can use the custom action again in the error handler to trigger the main flow's error handler.
Subflow
- [do stuff]
- Custom Action [Throw Error]
Subflow Error Handler
-
- [do stuff]
- Custom Action [Throw Error]
Main flow Error Handler (gets triggered by subflow error)
-
-
- [do stuff]
-

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2022 02:19 AM
Hi JuFe,
If I get you right, you want to handle an Error when a Subflow you called from the Mainflow. Is this correct?
If yes, it is pretty easy, as the Error in the Subflow would be caught as error in the Main Flow so you can handle it there.
Here an example from one of my failing Subflows:
If you want to do something else, I do not see any other easy way besides setting a Subflow Output which you then parse in your main Flow.
Otherwise you would need to lookup the running instance of your main flow from within the Subflow and cancle/error it, which is way more complex than actually just handling the Output Variable.
Hope this was helpfull
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-02-2022 02:24 AM
Best option available is to use the return activity to pass the error in main flow and handle it from there
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2022 11:20 PM
I've now solved this by creating a custom action which thorws and error message I put into it. This will then be caught in the subflow error handler to do further actions. After these actions I can use the custom action again in the error handler to trigger the main flow's error handler.
Subflow
- [do stuff]
- Custom Action [Throw Error]
Subflow Error Handler
-
- [do stuff]
- Custom Action [Throw Error]
Main flow Error Handler (gets triggered by subflow error)
-
-
- [do stuff]
-