Prevent microflow being unused item

How to prevent microflows being called by Java or JavaScript from being marked as unused?

Paul

2 minute read

The Mendix Modeler has an advanced find function to find unused items. It is very helpful to remove obsolete microflows, pages, enumerations, etc from your model.

However, it is not able to know which microflows are called from Java and JavaScript. So those will appear in the list and if you did not document the microflow properly then some developer might decide to delete it and you will find out later.

The first advice is to add documentation to such microflow where it called from. Then the developer can decide whether this is still a valid microflow or not.

To prevent it from being listed is easy. Add an exclusive split as in the microflow below. Flow true is the normal behavior of the microflow, flow false calls the same microflow.

The screenshot below shows the contents of the exclusive split. It is set hard to true.

The next and last screenshot shows the call to itself. It is a microflow action calling the microflow it is in. The typical flow will never get here so do not worry about infinite loops. But this is the trick to fool the Mendix Modeler.

There’s one drawback to this approach. In case the microflow is really obsolete because it is not called from Java or JavaScript anymore, you will not find it. Decide for yourself what works best for you.