Try Catch Block In Microflow - Mendix Forum

Try Catch Block In Microflow


Hi Community,


Did you faced a case where you are unsure at which point of microflow the error will occur hence you end up adding custom error handling at multiple activities of a microflow?

I faced similar issue where I have about 50 activities called in a microflow that gets called after a click of a button. Now assume there was a try and catch activity feature similar to Java  such that if error occurs in any one of the  50 activities of the microflow the catch activity will get executed and there we can do our custom error handling.


Note:  The try catch feature implementation can be in any ways but our ultimate goal is to catch error that can occur in any part of main Microflow.

Current Case:



Try Catch Feature:


4 answers

Agreed I can add a single cover microflow which will call my main microflow on which I’ll add error handling. So now my button will call my Cover microflow instead of Main microflow. But would it be feasible to every time create a cover microflow because in this way we will create a chain of microflows calling microflow if my main microflow is already calling sub microflows.


So now I can think of one solution that Mendix can provide – Every widget which can trigger a microflow that widget itself will have a option to select an optional catch microflow where you can implement the common error handling in case the main microflow throws error.


Hi Ravi, since you have clearly said that the “ultimate goal is to catch error that can occur in any part of main Microflow”, adding an error handler on the microflow call action activity from where the microflow in context would be called will work.


Wouldn't it be easier to just put error handling on the microflow call calling this microflow? Then it'll catch anything that goes wrong in this flow.


Jbg brt nema sta ces