[jboss-user] [JBoss jBPM] - Problem with Timer, Scheduler

sid82 do-not-reply at jboss.com
Mon Feb 25 00:12:11 EST 2008


I am facing a problem while trying to use the Timer and Scheduler service of jBPM.


The process definition that I am using is:-

<process-definition name='SchedulerService'> 
  |    <start-state name='StartState'>
  |        <transition to='next'>
  |           <action class='jBPM.action.ActionClass'/>
  |        </transition>
  |    </start-state>
  |    <state name='next'>
  |        <timer name='Timer' duedate='3 seconds' repeat='1 seconds'>
  |           <action class='jBPM.action.ActionClass'/>
  |        </timer>
  |        <transition to='EndState'>
  |        </transition>
  |    </state>
  |    <end-state name='EndState'></end-state>
  | </process-definition>


Within jbpm.cfg.xml, I am using 'DbSchedulerServiceFactory' :-

<jbpm-context>
  | ...
  | <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
  | ...
  | </jbpm-context>


Everything works fine with this except that no action (named ActionClass) is executed at the specified time i.e. after 3 seconds of coming onto the node named 'next'. The action is not even called once so no wonder that it never gets repeated after every 1 second.

I have used the same action while transitioning from the 'StartState' to 'next', and it gets executed when a signal is given. But the same action is not called with the Timer.

I am using Timer along with persistence, i.e. all the data goes into database. So, I create jbpmContext before using timer (which is required). Also, till the time I am at node 'next', timer data still remains in database in JBPM_JOB table but when the process instance moves forward to the next state (i.e. 'EndState') the timer gets cancelled and deleted from database, which is also correct. So, the point is that everything is working as expected but still the action specified on the timer is not getting executed at all.

If you can please find out some time and look into the issue, it will be of great help.

Thanks in Advance.



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

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



More information about the jboss-user mailing list