[jboss-user] [JBoss jBPM] - jbpm-jpdl3.2.2 TaskMgmtInstance.createTaskInstance()

daniDG do-not-reply at jboss.com
Tue May 27 09:17:19 EDT 2008


Hi,

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
  | 
  |     addTaskInstance(taskInstance);
  | 
  |     // ... add a reference to the process instance
  | 
  |     taskInstance.setProcessInstance(executionContext.getProcessInstance());
  | 
  | ....
  | 

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


  | taskInstance.setProcessInstance(executionContext.getProcessInstance());
  | 

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

tia,
daniel

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4153597#4153597

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4153597



More information about the jboss-user mailing list