Allow End-event in a loop - Mendix Forum

Allow End-event in a loop

11

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.

asked
4 answers

This issue has been created at least one more time (w/o a solution/explanation so far): https://community.mendix.com/link/space/microflows/ideas/4199

Created

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

Created

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

Created

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?

Created