5 Replies Latest reply on Jul 2, 2009 3:12 PM by Ronald van Kuijk

    Error while completing task

    sri r Newbie

      Hi,

      Following error is thrown when last task in a process is completed.
      This happens only for the last task before the process is ended and not for intermediate tasks.

      Also, should i explicitly set the value of result in variables? something like this? I'm assuming this to be only in case of sub process and is not needed even if task has multiple transitions?

      taskService.setVariable(taskImpl.getDbid(), "result", action);



      Code & Process Definition:

       taskService.completeTask(taskImpl.getDbid());
      
      <?xml version="1.0" encoding="UTF-8"?>
      
      <process name="SimpleProcess" xmlns="http://jbpm.org/4.0/jpdl">
      
       <start g="20,20,48,48">
       <transition to="review1" />
       </start>
      
       <task name="review1" g="96,16,127,52">
       <assignment-handler class="com.test.tasks.TaskHandler">
       </assignment-handler>
       <transition to="review2" />
       </task>
      
       <task name="review2" g="96,16,127,52">
       <assignment-handler class="com.test.tasks.TaskHandler">
       </assignment-handler>
       <transition to="endstate" />
       </task>
      
       <end name="endstate" g="255,16,88,52" />
      
      </process>
      
      



      java.lang.NullPointerException
       at org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:47)
       at org.jbpm.pvm.internal.cmd.CompleteTaskCmd.execute(CompleteTaskCmd.java:31)
       at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
       at org.jbpm.pvm.internal.spring.CommandTransactionCallback.doInTransaction(CommandTransactionCallback.java:50)
       at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
       at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:76)
       at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
       at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
      
      
      
      





      Thanks,
      -Rams