7 Replies Latest reply on Jul 10, 2009 2:32 PM by sri r

    [jBPM4] Error while creating processinstance having timers

    sri r Newbie

      Hi,

      I'm able to deploy below process definition but fails why creating process instance out of it. Transaction seems to be null.

      
      <?xml version="1.0" encoding="UTF-8"?>
      
      <process name="JobExecutor" xmlns="http://jbpm.org/4.0/jpdl">
      
       <start g="19,50,48,48">
       <transition to="guardedWait1"/>
       </start>
      
       <task name="guardedWait1" g="98,46,127,52">
       <transition name="go on" to="next step" g="-16,-17"/>
       <transition name="timeout" to="guardedWait2" g="-43,-16">
       <timer duedate="3 minutes"/>
       </transition>
       </task>
      
       <task name="guardedWait2" g="98,46,127,52">
       <on event="timeout">
       <timer duedate="5 minutes"/>
       <event-listener class="test.TaskEscalateHandler"/>
       </on>
       <transition name="go on" to="next step" g="-16,-17"/>
       </task>
      
       <end name="next step" g="283,46,83,53"/>
      
      </process>
      
      


      Error
      java.lang.NullPointerException
       at org.jbpm.pvm.internal.jobexecutor.JobExecutorTimerSession.schedule(JobExecutorTimerSession.java:58)
       at org.jbpm.pvm.internal.job.TimerImpl.schedule(TimerImpl.java:68)
       at org.jbpm.pvm.internal.model.ScopeInstanceImpl.initializeTimers(ScopeInstanceImpl.java:311)
       at org.jbpm.pvm.internal.model.ExecutionImpl.createScope(ExecutionImpl.java:245)
       at org.jbpm.pvm.internal.model.op.TransitionStartActivity.perform(TransitionStartActivity.java:82)
       at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperationSync(ExecutionImpl.java:625)
       at org.jbpm.pvm.internal.model.ExecutionImpl.performAtomicOperation(ExecutionImpl.java:585)
       at org.jbpm.pvm.internal.model.ExecutionImpl.start(ExecutionImpl.java:198)
       at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:64)
       at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:37)
       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)
       at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:69)
      
      


      I do have jboexecutor defined in my jbpm.cfg.xml

      <import resource="jbpm.jobexecutor.cfg.xml"/>


      I may be missing something really simple here...any pointers?

      Thanks