6 Replies Latest reply on Oct 18, 2007 11:20 AM by olivier.ch

    Timer persisted but not fired

      Hi All!

      I'm facing a frustrating timer problem. My process enters the "waitForAR" state correctly and a timer entry is correctly persisted in JBPM_TIMER, with a correct due date. My problem is the timer is never "fired" and the transition thus never followed...

      The empty action (with a space between the open and close tag) is a suggestion I already received but it did not work.

      I'm not sure what I could be missing. Perhaps a scheduler is not there monitoring the process. Is there an easy way to tell?

      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition name="myprocess">
       <start-state name="start">
       <transition name="" to="isARAvailable"></transition>
       </start-state>
       <end-state name="end"></end-state>
      
       <state name="waitForAR">
       <timer name="waitingForAR" duedate="30 seconds" transition="waitingForARInLoop">
       <action> </action>
       </timer>
       <transition name="waitingForARInLoop" to="isARAvailable"/>
       </state>
      
       <decision name="isARAvailable" expression="#{ARChecker.isARAvailable}">
       <transition name="false" to="waitForAR"></transition>
       <transition name="true" to="writeToAR"></transition>
       </decision>
      
       <task-node name="writeToAR">
       <transition name="writeToAR" to="end">
       <action expression="#{ARReturnService.writeToAR}"/>
       </transition>
       </task-node>
      </process-definition>
      


        • 1. Re: Timer persisted but not fired
          kukeltje

          Yes, look in the logging (maybe turn up the loglevel) You'll see a scheduler if it is running. Normally it is a servlet

          • 2. Re: Timer persisted but not fired

            Indeed! I was missing a timer servlet in my web.xml. Here is how it's initialized:

             <servlet>
             <servlet-name>Scheduler Servlet</servlet-name>
             <servlet-class>org.jbpm.scheduler.impl.SchedulerServlet</servlet-class>
             <load-on-startup>1</load-on-startup>
             </servlet>
            


            • 3. Re: Timer persisted but not fired
              arshadnj

              Any idea why it should be configured as servlet instead of an start-up listener configured through web.xml?:

              <listener>
               <listener-class>xxx.web.StartupListener</listener-class>
               </listener>


              I mean just moving the code from servlet into an application specific start-up listener?

              Thanks,
              arshad



              • 4. Re: Timer persisted but not fired
                arshadnj

                Wondering what is relationship between org.jbpm.scheduler.impl.Scheduler vs org.jbpm.scheduler.db.DbSchedulerService?

                We did configure the scheduler service through jbpm.cfg.xml but it doesn't seem to be working (not sure whether spring modules need to kick this off) but now while I was going through this thread, it talks about SchdulerServlet which uses the class org.jbpm.scheduler.impl.Scheduler?

                Any clarifications about this confusion?

                Thanks for your help.

                Arshad

                • 5. Re: Timer persisted but not fired
                  arshadnj

                  ok, it is clear now, the Scheduler Servlet is triggering the db.SchedulerSession which is linked to DB Scheduler service.

                  • 6. Re: Timer persisted but not fired
                    olivier.ch


                    And how do you do when you don't use web application to start and to use the scheduler and timers ... ?

                    Olivier