Does a while loop exist in Mendix?

3
I need to repeatedly call a REST API until a remote task has been processed. Is there a way to create a while loop inside a microflow? I would trigger a break event in the loop once the response to the API call indicates that the remote task has been processed. Currently, the Modeler displays an error because the loop is not iterating over a list. I don't have a list, I simply want to repeat the API call until the response meets a particular condition.
asked
2 answers
10

You can use a orange exclusive split gateway which follows the truepath when 'IsDone' variable is true. Return to the the Red Merge activity when 'IsDone' variable is still false. I think you should build in a safety net (timeout or something) so your microflow won't result in an endless loop.

https://modelshare.mendix.com/models/71e46a19-823b-4899-92de-a9d816e83970/example-loop?embed=true

answered
0

The ‘while’ option is now available in Mendix version 9.0.5:

https://docs.mendix.com/refguide/loop

answered