Custom with rollback error flow not visited when MF is called by RabbitMQ consumer

0
Hi. We have java action that creates a RabbitMQ message consumer and the consumer calls the following: final IContext systemContext = Core.createSystemContext(); Core .microflowCall(microflowName) .inTransaction(true) .withParam(inputName, message) .execute(systemContext); (in a separate java thread of course)   The microflow contains a sub-microflow action with a "Custom with rollback" error handler and the error flow is only visited when the microflow is triggered by an action button. When it’s called by the RabbitMQ consumer and the sub-microflow throws an exception it’s lost and instead an “autocommitted objects” exception is logged. I thought that with “custom with rollback” I wouldn’t have to worry about autocommitted objects. Exception occurred between two microflow object executions, microflow 'BookProposal.ACT_Process_IncomingProposal' is terminated. -------- com.mendix.systemwideinterfaces.MendixRuntimeException: Autocommitted objects detected at end of transaction for system session for entities: - BookPlanningMain.Edition: 1 instances - BookPlanningMain.MarketingTexts: 1 instances - Cover.Cover: 1 instances at com.mendix.basis.action.RequestScope.$anonfun$endTransaction$3(RequestScope.scala:163) at scala.Option.foreach(Option.scala:437) at com.mendix.basis.action.RequestScope.verifyNoAutoCommitsExist$1(RequestScope.scala:156) at com.mendix.basis.action.RequestScope.$anonfun$endTransaction$7(RequestScope.scala:171) at com.mendix.basis.action.RequestScope.$anonfun$endTransaction$7$adapted(RequestScope.scala:166) at scala.Option.foreach(Option.scala:437) at com.mendix.basis.action.RequestScope.endTransaction(RequestScope.scala:166) at com.mendix.basis.action.ContextImpl.endTransaction(ContextImpl.scala:78) at com.mendix.util.ContextUtil$RichContext$.withTransaction$extension(ContextUtil.scala:19) at com.mendix.basis.actionmanagement.ActionManager.executeInTransactionSync(ActionManager.scala:119) at com.mendix.basis.component.ObjectManagementCore.instantiateLocal(ObjectManagementCore.scala:102) at com.mendix.basis.component.ObjectManagementCore.instantiateLocal$(ObjectManagementCore.scala:97) at com.mendix.basis.component.InternalCore.instantiateLocal(InternalCore.scala:24) at com.mendix.modules.microflowengine.MicroflowUtil.storeExceptionInVariables(MicroflowUtil.java:136) at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:90) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.$anonfun$execute$1(MicroflowObject.scala:50) at scala.Option.flatMap(Option.scala:283) at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.scala:29) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.$anonfun$executeAfterBreakingIfNecessary$2(MicroflowImpl.scala:167) at scala.Option.flatMap(Option.scala:283) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.scala:167) at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.scala:114) at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:58) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:71) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:48) at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.java:56) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.$anonfun$runMonitoredAction$1(CoreActionHandlerImpl.scala:59) at com.mendix.basis.actionmanagement.ActionMonitoring$.$anonfun$monitor$1(ActionMonitoring.scala:49) at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:20) at com.mendix.basis.actionmanagement.ActionMonitoring$.monitor(ActionMonitoring.scala:49) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.runMonitoredAction(CoreActionHandlerImpl.scala:59) at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:46) at com.mendix.core.actionmanagement.internal.InternalCoreAction.call(InternalCoreAction.java:56) at com.mendix.basis.actionmanagement.ActionManager.$anonfun$executeSync$2(ActionManager.scala:106) at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:20) at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:105) at com.mendix.basis.actionmanagement.MicroflowCallBuilderImpl.execute(MicroflowCallBuilderImpl.scala:62) at rabbitmqconnector.actions.SubscribeToExchange$1.handleDelivery(SubscribeToExchange.java:92) at com.rabbitmq.client.impl.ConsumerDispatcher$5.run(ConsumerDispatcher.java:149) at com.rabbitmq.client.impl.ConsumerWorkService$WorkPoolRunnable.run(ConsumerWorkService.java:104) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834)  
asked
0 answers