Java Action VS Custom Microflow

Hey guys, I was wondering if it is better, performance wise, to create custom Microflows or Java Actions when running intensive processes.   For example, I’m running a long process used to get some calculation results in the end which can take around 2 hours, is it faster to call a Java Action or a custom Microflow?
2 answers

Hi Diogo,

Firstly, as Mike said is very important to spend some time looking to the process and try to optimize it. However, 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.


Task queue doc:


Best Regards,

Ricardo Pereira



I just posted an answer to a similar question here:  


If the process is taking a couple of hours, I would spend time looking at each step of the process to determine which parts of the process are most time consuming.  Then you can work on performance of those.  Its hard to say if Java or microflow actions will be quicker without looking at the specific microflow.  However, if you can rely on the database server to do some of the processing, that could speed up your microflow.


You may also see some good ideas here that will help you rework your microflow for better performance: