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&...]