2 Replies Latest reply on Jul 21, 2011 8:04 PM by garys

    WorkItemManager NullPointerException

    garys

      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