By default, a Mendix transaction starts with the first green dot in a microflow and ends with the red dot from the same microflow. Every sub microflow 'lives’ within the same transaction. The problem comes in play when certain logic of sub microflows needs to be committed before going further and it may only be done by one person/system at a time. So disallow concurrent execution is set to true.
Examples of this logic could be:
- Getting a single token from a server, and this token is used in a server-to-server interface. But multiple users can actually 'trigger’ the service.
- Determine a unique reference key, which is a combined set of values. For example [year][type][sequence number] → 2020MX000123.
The problem is that Mendix does not support this and there are certain workarounds, but those could be a bit cumbersome. It must be in a synchronous action and community commons supports this only for a user. Not a system. There is a workaround, but not very nice I would say. And currently, I could create a java action for every specific microflow. Why this way: I can pass parameters nicely with the Runtime API interface for microflows.
Possible implementation cloud be like below.