I have a small microflow in my application that includes a database retrieve. When the app is started and this microflow is invoked, this database retrieve does not execute, as you can see in the following screenshot, the microflow has moved past the retrieve, but there is not Task_List variable in the variables pane. In addition, when I try to place a breakpoint on this action, the Modeler tells me that it doesn't exist in the microflow I am working on, as you will see in this screenshot. Any help would be appreciated, because I am stumped as to what is happening with this retrieve.
Mendix performs a query optimization: a retrieve list followed by an aggregate list action will be merged into a single query returning only the aggregate result, if the list is not used anymore. This is more efficient than retrieving the entire list from the database, passing it to the business server and then aggregating on the business server.
The work around would be to use the list for another operation.
I haven't found a reference to this in the documentation, but there is a Mendix response here.