Hello everyone, We are experiencing an issue with a Task Queue in our application. Despite having configured a sub-microflow with a 'Fixed delay' retry policy (set to 3 retries with a 20-second interval), the task queue is not behaving as expected. Even after reaching the 3-retry limit, the microflow continues to execute and report errors. Additionally, we've noticed the task attempts to run every 5 minutes regardless of the defined interval. I have attached the logs below for your review. Could you please provide some insight into why the retry limits and intervals are being ignored? 2025-12-23 06:18:17.395 WARNING - TaskQueue: Cannot move task 'ARIFA.IVK_AR_SenEmail_2(Account=Administration.Account@40532396647793878,Subject='Welcome to ARIFA portal')' from task queue 'ARIFA.Sub_SendEmail' with id 30399297690680943 to processed tasks log. The status is Running. Current retries: 1106275.com.mendix.core.CoreRuntimeException: Failed to commit at com.mendix.basis.component.TransactionCore.doCommit(TransactionCore.scala:165) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"before":[{}],"action":{"type":"CommitAction"},"after":[],"type":"EventExtendedAction"}', all database changes executed by this action were rolled back at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:126) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"before":[{}],"action":{"type":"CommitAction"},"after":[],"type":"EventExtendedAction"}', all database changes executed by this action were rolled back at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:23) Caused by: com.mendix.core.CoreRuntimeException: Exception occurred in action '{"before":[{}],"action":{"type":"CommitAction"},"after":[],"type":"EventExtendedAction"}', all database changes executed by this action were rolled back at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.processErrorState(CoreActionHandlerImpl.scala:155) Caused by: com.mendix.core.CoreException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.NullPointerException: Cannot invoke "com.mendix.connectionbus.mapping.ForeignKeyConstraintKey.tableName()" because "fkcKey" is null at com.mendix.basis.actionmanagement.SyncEventExtendedAction.executeAction(SyncEventExtendedAction.scala:31) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.NullPointerException: Cannot invoke "com.mendix.connectionbus.mapping.ForeignKeyConstraintKey.tableName()" because "fkcKey" is null at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:126) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: java.lang.NullPointerException: Cannot invoke "com.mendix.connectionbus.mapping.ForeignKeyConstraintKey.tableName()" because "fkcKey" is null at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:23) Caused by: java.lang.NullPointerException: Cannot invoke "com.mendix.connectionbus.mapping.ForeignKeyConstraintKey.tableName()" because "fkcKey" is null at com.mendix.connectionbus.mapping.ForeignKeyConstraintMapper.com$mendix$connectionbus$mapping$ForeignKeyConstraintMapper$$createDetailsFromFkcName$1(ForeignKeyConstraintMapper.scala:49) at com.mendix.connectionbus.mapping.ForeignKeyConstraintMapper$$anonfun$toForeignKeyConstraintViolationDetails$1.applyOrElse(ForeignKeyConstraintMapper.scala:63) at com.mendix.connectionbus.mapping.ForeignKeyConstraintMapper$$anonfun$toForeignKeyConstraintViolationDetails$1.applyOrElse(ForeignKeyConstraintMapper.scala:62) at scala.PartialFunction$Lifted.apply(PartialFunction.scala:338) at scala.PartialFunction$Lifted.apply(PartialFunction.scala:334) at com.mendix.shared.util.MiscUtils$MatchEx$.whenMatch$extension(MiscUtils.scala:19) at com.mendix.connectionbus.mapping.ForeignKeyConstraintMapper.toForeignKeyConstraintViolationDetails(ForeignKeyConstraintMapper.scala:62) at com.mendix.connectionbus.mapping.ForeignKeyConstraintMapper.toForeignKeyConstraintViolationDetails$(ForeignKeyConstraintMapper.scala:46) at com.mendix.connectionbus.mapping.Mapper.toForeignKeyConstraintViolationDetails(Mapper.scala:45) at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.com$mendix$connectionbus$connections$jdbc$JdbcDataStore$$throwForeignKeyConstraintViolationException(JdbcDataStore.scala:1212) at com.mendix.connectionbus.connections.jdbc.JdbcDataStore$$anonfun$recoverUniqueViolationException$6.applyOrElse(JdbcDataStore.scala:1117) at com.mendix.connectionbus.connections.jdbc.JdbcDataStore$$anonfun$recoverUniqueViolationException$6.applyOrElse(JdbcDataStore.scala:1111) at scala.util.Failure.recover(Try.scala:242) at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.executeWithUcViolationHandling(JdbcDataStore.scala:1077) at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.doModificationQueries$1(JdbcDataStore.scala:907) at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.$anonfun$execModificationQueries$3(JdbcDataStore.scala:910) at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.executeWithRetry(JdbcDataStore.scala:923) at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.execModificationQueries(JdbcDataStore.scala:910) at com.mendix.connectionbus.connections.jdbc.JdbcDataStore.execCreateQueries(J Thank you in advance for your help! Best regards, Álvaro
asked
Alvaro Lamadrid Agudo
1 answers
0
The error message is indicating that the transaction was rolled back because an error occurred during a before-commit or after-commit event. The log shows that the commit was triggered, but while executing one of the commit events, a runtime exception occurred (for example, a null reference or a foreign key issue). Because of this, Mendix rolled back the entire transaction, and the task could not move to a finished state.
This means the first thing to check should be all before-commit and after-commit event microflows on the entities that are being committed by the task. Those event microflows may be assuming certain attributes or associations are always available, while in this specific flow they are null or incomplete. As long as the commit keeps failing inside these events, the task will stay in the Running state and be retried. Therefore, reviewing and fixing the logic in the related commit events is the most important step to resolve this issue.