Allow End-event in a loop - Mendix Forum

Allow End-event in a loop


Placing an end event inside a loop results in errormessage 81:
81 End events cannot be placed inside a loop.

This is a needless limitation of modelling-freedom and there are several scenarios where placing an end-event in a loop is the best flow-design.

For instance if you need to loop over a list to find the first item meeting your criteria. When found, you're done. When none found after going through the entire list you need to handle the none-found-scenario.

3 answers

Did this have a solution? I am looking for an answer, since I am now wanting to end a microflow after certain conditions aren't met inside a loop


Yep, I mean to introduce the End event possibility in the loop. So not to replace the break event, that may stay as is.


You mean to replace the Break event with the End event altogether?

The scenario you're describing is already handled if you use the break event (link)

Edit: Ah I think I understand after re-reading. You mean to introduce the End event possibility in the loop, and it's behaviour would be to not just exit the loop, but also exit the microflow, is that correct?