Documentation on error handling (continue, error event, continue) - is it wrong?
Hi all, we have recently discussed an error handling use case and after some discussion we looked at the documentation here: 4-4-continuing-in-the-parent-flow-continuing-in-the-subflow So, this was exactly our use case: an error occurrs, then is catched in a continue, then the error event is triggered and again catched in a continue. Now this part of documentation states, that nothing is rolled back in that case. However, actual testing shows, that this is not true. Instead all changes before the error event are also rolled back, which is also in line with the documentation of the error event: https://docs.mendix.com/refguide/error-event Now I'm wondering if we're misinterpreting the docs on combination 4.4 all together, or is it just plain wrong - anyway I think this section in the documentation really needs some clarification. regards, Fabian Main Microflow (Model Share) Sub Microflow (Model Share)
I generally don't use an error event unless I want to throw an exception at the caller. If you need your main flow to continue when a subflow ends in error, use a normal end event. Be sure to use a log action or some other means to track the error in your errorhandler before ending the flow or you will never know what happened.
If your main flow needs to know that not all sub processes completed normally, set a boolean or other status depending on whether you hit your error handler part of the flow. You could use a variable or an object attribute, if you want to keep track of these runs.