JBoss Community

Re: A question about rule task in jBPM5

created by dalgwen in jBPM - View the full discussion

Hello again,

 

Mauricio, I see that you requested a simple maven project to test the issue by yourself.

I did one simple test (I took most of the code from your "emergency" exemple).

With one JUnit execution you should be able to see the error. (maybe two or three executions because sometimes it crashes before, probably because of me messing things up)

Here it is : http://dl.free.fr/getfile.pl?file=/r6iubu9C

(the link is available one month, you have to click on "Telechargez ce fichier", sorry it's a french provider ;-) )

 

For instance, here is the output of my Junit test:

 

-----------------

Hibernate: insert into SessionInfo (id, lastModificationDate, rulesByteArray, startDate, OPTLOCK) values (null, ?, ?, ?, ?)

Hibernate: insert into ProcessInstanceInfo (InstanceId, lastModificationDate, lastReadDate, processId, processInstanceByteArray, startDate, state, OPTLOCK) values (null, ?, ?, ?, ?, ?, ?, ?)

BEFORE RULEFLOW STARTED process:Emergency Service Main Process[id=myworkflow]

BEFORE PROCESS NODE TRIGGERED node:StartProcess[id=1] process:Emergency Service Main Process[id=myworkflow]

BEFORE PROCESS NODE EXITED node:StartProcess[id=1] process:Emergency Service Main Process[id=myworkflow]

BEFORE PROCESS NODE TRIGGERED node:MyFirstWorkItem[id=8] process:Emergency Service Main Process[id=myworkflow]

Hibernate: insert into WorkItemInfo (workItemId, creationDate, name, processInstanceId, state, OPTLOCK, workItemByteArray) values (null, ?, ?, ?, ?, ?, ?)

AFTER PROCESS NODE TRIGGERED node:MyFirstWorkItem[id=8] process:Emergency Service Main Process[id=myworkflow]

AFTER PROCESS NODE TRIGGERED node:StartProcess[id=1] process:Emergency Service Main Process[id=myworkflow]

AFTER PROCESS NODE TRIGGERED node:StartProcess[id=1] process:Emergency Service Main Process[id=myworkflow]

AFTER RULEFLOW STARTED process:Emergency Service Main Process[id=myworkflow]

Work1

BEFORE PROCESS NODE EXITED node:MyFirstWorkItem[id=8] process:Emergency Service Main Process[id=myworkflow]

BEFORE PROCESS NODE TRIGGERED node:MyFirstWorkItem[id=9] process:Emergency Service Main Process[id=myworkflow]

java.lang.NullPointerException

    at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.internalExecuteWorkItem(JPAWorkItemManager.java:43)

    at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105)

    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)

    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:185)

    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:150)

    at org.jbpm.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:47)

    at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:162)

    at org.jbpm.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:143)

    at org.jbpm.workflow.instance.node.WorkItemNodeInstance.triggerCompleted(WorkItemNodeInstance.java:239)

    at org.jbpm.workflow.instance.node.WorkItemNodeInstance.workItemCompleted(WorkItemNodeInstance.java:301)

    at org.jbpm.workflow.instance.node.WorkItemNodeInstance.signalEvent(WorkItemNodeInstance.java:277)

    at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(WorkflowProcessInstanceImpl.java:333)

    at org.drools.persistence.jpa.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:119)

    at test.MyFirstWorkItemHandler$1.run(MyFirstWorkItemHandler.java:16)

    at java.lang.Thread.run(Thread.java:662)

Hibernate: insert into WorkItemInfo (workItemId, creationDate, name, processInstanceId, state, OPTLOCK, workItemByteArray) values (null, ?, ?, ?, ?, ?, ?)

Hibernate: update ProcessInstanceInfo set lastModificationDate=?, lastReadDate=?, processId=?, processInstanceByteArray=?, startDate=?, state=?, OPTLOCK=? where InstanceId=? and OPTLOCK=?

Hibernate: update WorkItemInfo set creationDate=?, name=?, processInstanceId=?, state=?, OPTLOCK=?, workItemByteArray=? where workItemId=? and OPTLOCK=?

Hibernate: update SessionInfo set lastModificationDate=?, rulesByteArray=?, startDate=?, OPTLOCK=? where id=? and OPTLOCK=?

Hibernate: update SessionInfo set lastModificationDate=?, rulesByteArray=?, startDate=?, OPTLOCK=? where id=? and OPTLOCK=?

-------------------------

 

If you could get a look at it, I would be very pleased.

Greetings

Reply to this message by going to Community

Start a new discussion in jBPM at Community