Hi,
I have a flow and a set of rules.
In the flow I have a wait state. If the wait state has a timer, when
the flow reaches the node it blows up with the following exception (
See Below ), if I remove the timer everything works.
INFO 2010-09-18 16:26:28 [ERROR]
com.kgcontrols.services.raytheon.standardsRequests.workflow.managers.DroolsEventsManager
Could not commit session
java.lang.RuntimeException: Could not commit session
at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:292)
at
org.drools.command.impl.CommandBasedStatefulKnowledgeSession.execute(CommandBasedStatefulKnowledgeSession.java:434)
at
com.kgcontrols.services.raytheon.standardsRequests.workflow.managers.DroolsEventsManager.sendEvent(DroolsEventsManager.java:43)
at
com.kgcontrols.services.raytheon.standardsRequests.workflow.Rule_domainLeadReject_0.defaultConsequence(Rule_domainLeadReject_0.java:10)
at
com.kgcontrols.services.raytheon.standardsRequests.workflow.Rule_domainLeadReject_0DefaultConsequenceInvoker.evaluate(Rule_domainLeadReject_0DefaultConsequenceInvoker.java:34)
at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:917)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:856)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1071)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:785)
at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:751)
at
org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:218)
at
org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:99)
at
org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:33)
at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:279)
at
org.drools.command.impl.CommandBasedStatefulKnowledgeSession.fireAllRules(CommandBasedStatefulKnowledgeSession.java:201)
at
com.kgcontrols.services.raytheon.standardsRequests.workflow.listeners.VoteCreatedEventListener.onMessage(VoteCreatedEventListener.java:78)
at
org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:854)
at
org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:99)
at
org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:166)
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:117)
at
org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:26)
at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:44)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.util.concurrent.RejectedExecutionException
at
java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1768)
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)
at
java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:216)
at
java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:379)
at org.drools.time.impl.JDKTimerService.schedule(JDKTimerService.java:102)
at org.drools.time.impl.JDKTimerService.scheduleJob(JDKTimerService.java:80)
at
org.drools.process.instance.timer.TimerManager.registerTimer(TimerManager.java:60)
at
org.drools.workflow.instance.node.StateBasedNodeInstance.internalTrigger(StateBasedNodeInstance.java:56)
at
org.drools.workflow.instance.node.CompositeNodeInstance.internalTrigger(CompositeNodeInstance.java:86)
at
org.drools.workflow.instance.node.StateNodeInstance.internalTrigger(StateNodeInstance.java:48)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:117)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:178)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:144)
at
org.drools.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:53)
at
org.drools.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:117)
at
org.drools.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:98)
at
org.drools.workflow.instance.node.WorkItemNodeInstance.triggerCompleted(WorkItemNodeInstance.java:201)
at
org.drools.workflow.instance.node.WorkItemNodeInstance.workItemCompleted(WorkItemNodeInstance.java:258)
at
org.drools.workflow.instance.node.WorkItemNodeInstance.signalEvent(WorkItemNodeInstance.java:234)
at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:337)
at
org.drools.persistence.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:99)
at
org.drools.process.workitem.email.EmailWorkItemHandler.executeWorkItem(EmailWorkItemHandler.java:104)
at
org.drools.persistence.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:45)
at
org.drools.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:101)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:117)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:178)
at
org.drools.workflow.instance.node.SplitInstance.internalTrigger(SplitInstance.java:94)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:117)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:178)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:144)
at
org.drools.workflow.instance.node.JoinInstance.triggerCompleted(JoinInstance.java:152)
at
org.drools.workflow.instance.node.JoinInstance.internalTrigger(JoinInstance.java:52)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:117)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:178)
at
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:144)
at
org.drools.workflow.instance.node.EventNodeInstance.triggerCompleted(EventNodeInstance.java:66)
at
org.drools.workflow.instance.node.EventNodeInstance.signalEvent(EventNodeInstance.java:50)
at
org.drools.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:351)
at
org.drools.command.runtime.process.SignalEventCommand.execute(SignalEventCommand.java:95)
at
org.drools.impl.StatefulKnowledgeSessionImpl.execute(StatefulKnowledgeSessionImpl.java:879)
at
org.drools.impl.StatefulKnowledgeSessionImpl.execute(StatefulKnowledgeSessionImpl.java:862)
at org.drools.command.ExecuteCommand.execute(ExecuteCommand.java:50)
at org.drools.command.ExecuteCommand.execute(ExecuteCommand.java:31)
at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:279)
... 24 more
INFO 2010-09-18 16:26:28 [ERROR]
com.kgcontrols.services.raytheon.standardsRequests.workflow.listeners.VoteCreatedEventListener
Unable to consume Vote created event: Could not commit session or
rollback
java.lang.RuntimeException: Could not commit session or rollback
at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:289)
at
org.drools.command.impl.CommandBasedStatefulKnowledgeSession.fireAllRules(CommandBasedStatefulKnowledgeSession.java:201)
at
com.kgcontrols.services.raytheon.standardsRequests.workflow.listeners.VoteCreatedEventListener.onMessage(VoteCreatedEventListener.java:78)
at
org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:854)
at
org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:99)
at
org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:166)
at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:117)
at
org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:26)
at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:44)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Unable to rollback transaction
at
org.drools.persistence.session.JtaTransactionManager.rollback(JtaTransactionManager.java:181)
at
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:287)
... 11 more
Caused by: java.lang.IllegalStateException: no transaction started on
this thread
at
bitronix.tm.BitronixTransactionManager.rollback(BitronixTransactionManager.java:111)
at
org.drools.persistence.session.JtaTransactionManager.rollback(JtaTransactionManager.java:178)
... 12 more
Can someone point me in the right direction.
Thanks