Hello and good day to anyone reading this. I’m new to mendix and I’m currently trying to use microflow timer to update the context of a non-persistable entity object running inside of a loop. Problem is, I cannot seem to update the context until after the loop is over and the microflow it’s running in ends. That’s when I get the last result I have updated the object to. I’m trying to use the React D3 Gauge to display real time data I’m receiving from a java action into an object that’s saved into a persistable entity and that changes the non-persistable entity object that’s used to display the data In the Loop content Microflow, it takes the simulationTime and DataOutput_NonPersistant as parameters, and I’m changing and commiting the objects mentioned above inside of it The Microflow timer does nothing but call a change object on the DataOutput_NonPersistant but doesn’t actually change anything. So The changes are only visible after the end event in the picture above. Is there a way to make it visible during the loop?
The effect of a microflow on your client/browser does not take place until after the a microflow finishes. So if you, for example, use a Show Page action or a Close Page action in a microflow, that action doesn’t happen until the microflow completes.
This happens because microflows are executed on the app server. The client sends a request to the server that says “Hey run this microflow” and the server responds when it’s done with new data and a set of instructions.
So, what can you do?
Use a nanoflow for your logic. Nanoflows run on the client and changes made in a nanoflow are reflected on the UI immediately
Call more, shorter microflows (possibly by using a microflow timer or possibly by using a nanoflow to execute them)