Hi,

 

I’m trying building a simple test case with drools flow (see in attachment).

My flow is like this : Start -> print a message -> human task -> print a message

 

The idea of the test is to start the flow and persist the task in the first part.

The second part resume the flow using JPAKnowledgeService.loadStatefulKnowledgeSession

 

My project is using h2 for tasks and processes persistence.

I’m using a custom human task handler, it basicaly persist the task using the org.drools.task.service.TaskService injected via spring quite like the WSHT implementation without all the client/server stuff

 

It works fine except when a want to assign actorId via a rule. To do that, I’m trying to reuse the assignment.drl and workflow_rules.drl from the drools examples. I red somewhere that i need to set ‘drools.advancedProcessRuleIntegration=true’ in drools.rulebase.conf to make it work (is that correct ?).

When i do that, my workflow doesn’t resume and i’m getting this exception :

 

Caused by: java.lang.NullPointerException

      at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1372)

      at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:1338)

      at org.drools.workflow.instance.node.WorkItemNodeInstance.triggerCompleted(WorkItemNodeInstance.java:199)

      at org.drools.workflow.instance.node.HumanTaskNodeInstance.triggerCompleted(HumanTaskNodeInstance.java:90)

      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.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:69)

      at org.drools.command.runtime.process.CompleteWorkItemCommand.execute(CompleteWorkItemCommand.java:34)

      at org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:279)

      ... 27 more

 

I’ve attached a simple project using maven/spring/hibernate

 

Am I missing something ?

What am I dong wrong ?

 

Thanks for your help