Everything that happens in one request to the mendix runtime server is part of the same database transaction. If anything fails, either in the main microflow, or one of the submicroflows, all database changes are rolledback.
This is usually what you want: suppose you have some complex multi-microflow logic sitting behind a save button in your webpage, this should either completely fail, or completely succeed.
For long running microflow this may not be the best solution. There are a few ways you can influence the transaction scope:
And the option i usually prefer, as it also loadbalances your submicroflows across your runtime instances:
That is indeed true. A microflow ends the database transactions when it finishes.
If you want you can use the EndTransaction and StartTransaction java actions to actually commit the objects before the microflow ends. This can be found in the community commons module.
There are also some advanced and expert learnings specifically about this topic if you’re interested in them.