0 Replies Latest reply on May 27, 2008 9:17 AM by Daniel Guggi

    jbpm-jpdl3.2.2 TaskMgmtInstance.createTaskInstance()

    Daniel Guggi Newbie


      we are migrating from jbpm-3.0.4 to jbpm-jpdl-3.2.2 - yes we missed 3.1.x :(

      Most things work fine so far, however I have an "old" TestClass which creates a TaskInstance as follows:

      TaskInstance taskInstance = processInstance.getTaskMgmtInstance().createTaskInstance();

      This works fine in jbpm-3.0.4 and jbpm-3.1.4. However in jbpm-jpdl-3.2.2 this brings a NullPointerException. Here is the relevant code from jbpm-jpdl-3.2.2 org.jbpm.taskmgmt.exe.TaskMgmtInstance:

      public TaskInstance createTaskInstance() {
       return createTaskInstance(null, (ExecutionContext)null);
      public TaskInstance createTaskInstance(Task task, ExecutionContext executionContext) {
       // instantiate the new task instance
       TaskInstance taskInstance = instantiateNewTaskInstance(executionContext);
       // bind the task instance to the TaskMgmtInstance
       // ... add a reference to the process instance

      Obviously a call to TaskMgmtInstance.createTaskInstance() has to fail on the following line (because 'executionContext' is null):


      What is the reason for that -> bug?
      Is it a known issues? Is there a workaround or fix for that?