[jboss-user] [jBPM] - rule.ConsequenceException only with JPA

Gary Struthers do-not-reply at jboss.com
Tue Aug 9 21:09:21 EDT 2011


Gary Struthers [http://community.jboss.org/people/GaryS] created the discussion

"rule.ConsequenceException only with JPA"

To view the discussion, visit: http://community.jboss.org/message/620233#620233

--------------------------------------------------------------
I've adapted Salaboy's /04-jBPM5-PersistentEmergencyServiceProcess to my process and rule. I copied it's 2 process managers and jpa configuration and adapted his test class. The h2 database connection works. I made another process manager that doesn't use 
JPAKnowledgeService, it just calls kbase.newStatefulKnowledgeSession()

My rule execute with kbase.newStatefulKnowledgeSession()
AFTER RULEFLOW COMPLETED process...
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.788 sec

But with JPAKnowledgeService 
Hibernate: update ProcessInstanceInfo set lastModificationDate=?, lastReadDate=?, processId=?, processInstanceByteArray=?, startDate=?, state=?, OPTLOCK=? where InstanceId=? and OPTLOCK=?
BEFORE ACTIVATION FIRED rule:applicationReady activationId:applicationReady [3, 2] declarations: $process=WorkflowProcessInstance1 [processId=XXX,state=1](2); $vars=FreshmanReadPIvars [XXX](3) ruleflow-group: assignApplication
1    09/08 17:44:59,788[main] ERROR drools.persistence.SingleSessionCommandService.rollbackTransaction - Could not commit session
org.drools.runtime.rule.ConsequenceException: rule: applicationReady

          at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39)
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/620233#620233]

Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110809/73ecb3d5/attachment.html 


More information about the jboss-user mailing list