Java Actions vs Custom Microflow

I have a project where there are heavy calculations and I’m wondering: On a long process is it better to use a java actions or a custom microflow?
2 answers

Hi Miguel,

Use Java actions helps a lot in small functionalities like split strings or duplicates objects. As Mike said by creating custom java actions can cause issues while upgrading the Mendix app.

If you are working with heavy calculations you should do it in background using microflows + task queues. 

Pay attention to the version of your project. Tasks queues were added few versions ago, so if you are using a old version of studio pro you will need to use one java action called “executeMicroflowInBackground” from community commons module.



I hope it helps! Best Regards,

Ricardo Pereira



I am not sure what you mean by a custom microflow.  But assuming you mean a microflow that you create for the purpose of performing calculations.  If so, my preference is always for a microflow, because custom Java actions have potential issues when upgrading a Mendix app and requires Java development skills for app maintenance.


You may find that you need to tune the performance of your app if you are performing a lot of calculations on a large dataset.  In general, moving as much of the calculation as possible into the database will result in better performance.