Task Queue runs immediately instead of Transaction completion

2
Hi -    As per Mendix documentation, Task Queue Microflow runs as soon as the transaction in which it was called/queued completes.    Refer the below from documentation:  Scheduling a microflow or Java action to be executed returns immediately. The task will be executed somewhere in the cluster, as soon as possible after the transaction in which it was called completes.   Link: https://docs.mendix.com/refguide/task-queue/#1-introduction    I am facing one issue in my code where Task queue microflow triggers immediately when we queue/call it. It is not waiting for the parent transaction to get completed.    I have checked this is not version related issue as other projects we do not have this issue.    What could possibly cause this abnormal behavior on task queues in the code? Any leads appreciated.    Thanks, Amit   
asked
1 answers
0

I encountered the same issue today in one of ours apps. This behaviour is triggered if a previous action mistakenly ends the current transaction.

In our case it cause was enabling the custom errorhandling of a Consumed ODataService. This mistakenly closes the current transaction triggering all current and future tasks to be executed directly since the database updates are now executed directly instead of in a transaction.

 

answered