Exception occurred between two microflow object executions, microflow xxxxx is terminated.

0
On mendix 4 it worked fine but now during testing after upgrading to mendix 7 we experience the following when calling a specific Webservice.  Also I have exception handling on the web service call but it does not even go into exception flow. it just stop executing the microflow at all. Another thing I picked up now is when executing the microflow from a button on a screen it works but doing it from a scheduled event like i am doing it fails. so the only difference is from scheduled event or manually executing    com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: Autocommitted objects detected at end of transaction for system session for entities:   - BlazeJedi.CreditOriginationDecisionOutput: 1 instances     at com.mendix.basis.actionmanagement.ActionManager.executeInTransactionSync(ActionManager.java:161) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: Autocommitted objects detected at end of transaction for system session for entities:   - BlazeJedi.CreditOriginationDecisionOutput: 1 instances     at com.mendix.basis.action.RequestScope.$anonfun$endTransaction$1(RequestScope.scala:125)     at com.mendix.basis.action.RequestScope.$anonfun$endTransaction$1$adapted(RequestScope.scala:116)     at scala.Option.foreach(Option.scala:257)     at com.mendix.basis.action.RequestScope.verifyNoAutoCommitsForSystemSessionExists$1(RequestScope.scala:116)     at com.mendix.basis.action.RequestScope.$anonfun$endTransaction$7(RequestScope.scala:132)     at com.mendix.basis.action.RequestScope.$anonfun$endTransaction$7$adapted(RequestScope.scala:129)     at scala.Option.foreach(Option.scala:257)     at com.mendix.basis.action.RequestScope.endTransaction(RequestScope.scala:129)     at com.mendix.basis.action.ContextImpl.endTransaction(ContextImpl.java:202)     at com.mendix.basis.actionmanagement.ActionManager.executeInTransactionSync(ActionManager.java:156)     at com.mendix.basis.component.InternalCore.instantiate(InternalCore.java:970)     at com.mendix.modules.microflowengine.MicroflowUtil.storeExceptionInVariables(MicroflowUtil.java:195)     at com.mendix.modules.microflowengine.MicroflowUtil.processException(MicroflowUtil.java:151)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:59)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:201)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:55)     at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191)     at com.mendix.basis.component.InternalCore.executeSync(InternalCore.java:661)     at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:43)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:201)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:55)     at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191)     at com.mendix.basis.component.InternalCore.executeSync(InternalCore.java:661)     at com.mendix.modules.microflowengine.actions.SubMicroflowAction.execute(SubMicroflowAction.scala:43)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:201)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:55)     at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191)     at com.mendix.basis.component.InternalCore.executeSync(InternalCore.java:661)     at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction.$anonfun$executeLoop$2(NestedLoopMicroflowAction.scala:70)     at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction.$anonfun$executeLoop$2$adapted(NestedLoopMicroflowAction.scala:61)     at scala.collection.TraversableLike$WithFilter.$anonfun$foreach$1(TraversableLike.scala:789)     at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:59)     at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:52)     at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)     at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:788)     at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction.executeLoop(NestedLoopMicroflowAction.scala:61)     at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction.execute(NestedLoopMicroflowAction.scala:44)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:201)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:55)     at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191)     at com.mendix.basis.component.InternalCore.executeSync(InternalCore.java:661)     at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction.$anonfun$executeLoop$2(NestedLoopMicroflowAction.scala:70)     at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction.$anonfun$executeLoop$2$adapted(NestedLoopMicroflowAction.scala:61)     at scala.collection.TraversableLike$WithFilter.$anonfun$foreach$1(TraversableLike.scala:789)     at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:59)     at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:52)     at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)     at scala.collection.TraversableLike$WithFilter.foreach(TraversableLike.scala:788)     at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction.executeLoop(NestedLoopMicroflowAction.scala:61)     at com.mendix.modules.microflowengine.actions.other.NestedLoopedMicroflowAction.execute(NestedLoopMicroflowAction.scala:44)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowObject.execute(MicroflowObject.java:47)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAfterBreakingIfNecessary(MicroflowImpl.java:201)     at com.mendix.modules.microflowengine.microflow.impl.MicroflowImpl.executeAction(MicroflowImpl.java:157)     at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:50)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.doCall(CoreActionHandlerImpl.scala:76)     at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.call(CoreActionHandlerImpl.scala:55)     at com.mendix.core.actionmanagement.CoreAction.call(CoreAction.java:55)     at com.mendix.basis.actionmanagement.ActionManager$1.execute(ActionManager.java:186)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.java:191)     at com.mendix.basis.component.InternalCore.execute(InternalCore.java:583)     at com.mendix.basis.actionmanagement.UserScheduledAction.executeScheduledAction(ScheduledAction.scala:73)     at com.mendix.basis.actionmanagement.ScheduledAction$ScheduledRun.$anonfun$run$1(ScheduledAction.scala:140)     at com.mendix.basis.actionmanagement.IMonitoredAction$$anon$1.execute(IMonitoredAction.scala:47)     at com.mendix.util.classloading.Runner.doRunUsingClassLoaderOf(Runner.java:32)     at com.mendix.basis.actionmanagement.IMonitoredAction.monitor(IMonitoredAction.scala:49)     at com.mendix.basis.actionmanagement.IMonitoredAction.monitor$(IMonitoredAction.scala:25)     at com.mendix.basis.actionmanagement.ScheduledAction$ScheduledRun.monitor(ScheduledAction.scala:131)     at com.mendix.basis.actionmanagement.ScheduledAction$ScheduledRun.run(ScheduledAction.scala:140)     at com.mendix.basis.actionmanagement.ScheduledAction.execute(ScheduledAction.scala:129)     at com.mendix.basis.actionmanagement.ScheduledAction.run(ScheduledAction.scala:110)     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)     at java.lang.Thread.run(Thread.java:745)  
asked
1 answers
2

From the documentation:

An autocommit is an automatic commit from the platform, which is done to keep the domain model in sync. If your application ends up having autocommitted objects, then you will have a modeling error. Since an association is also a member of an object, the association will be stored in the database as well. This means that if you create an order line inside an order and the order line is the parent of the association, when you commit the order line, the order will be autocommitted.

Note that when a user that created those objects logs out the autocommitted objects (and the references) gets removed by the database. Since there is no user context I think you get the above error. So check your model why you have autocommitted objects because that is the root cause of the problem.

Regards,

Ronald

[EDIT]

See also this post for sollutions to problems with webservices and autocommits: https://community.mendix.com/link/questions/9902

 

answered