JBoss Community

WorkItemManager NullPointerException

created by Gary Struthers in jBPM - View the full discussion

I'm trying to JUnit test a User Task.

TestWorkItemHandler workItemHandler = new TestWorkItemHandler();

                    ksession.getWorkItemManager().registerWorkItemHandler("Human Task", workItemHandler);

 

Throws a NullPointerException and the session's workItemManager is null. I'm using a copy of TestWorkItemHandler from the examples BPMN2UnitTests. And I'm using JUnit4.

 

BPMN2UnitTests testUserTask() registers the workItemHandler the same way and the test passes. It uses JUnit3.

 

I don't see how the WorkItemManager is created and I don't see why there would be a difference between JUnit3 and JUnit4

Reply to this message by going to Community

Start a new discussion in jBPM at Community