3 Replies Latest reply on Jul 30, 2010 12:35 PM by Tun Mang

    in jbpm 4.3, timer not firing to leave its state node.

    Tun Mang Novice

      Hi :

       

      There is a timer session configured in my "jbpm.default.cfg.xml" as shown below:

       

          ....

          <timer-session />

          ....

       

      The core of the process definition is very simple as shown below for the timer to fire and leave the state node:

       

          <state g="222,123,147,40" name="generate-file">
            <transition g="-71,-15" name="timeout" to="remove-file">
              <timer duedate="5 seconds"/>
            </transition>          
         </state>

       

      The next node is an action to dump message to prove the process leaving and entering a new node.

       

      When I run it, it never leaves the state node, but the jbpm database shows a pair of parent-child entries created:

       

          ----------------------------------------------------------------------------------------------------------

          DBID       Activity         ID                                                State

          ----------------------------------------------------------------------------------------------------------

          1210001  generate-file  test_Timer_1.1210001                    inactive-scope

          1210001  generate-file  test_Timer_1.1210001.generate-file  active-root

          ----------------------------------------------------------------------------------------------------------

       

      Is it because something missing in the "jbpm.default.cfg.xml", so it won't fire and leave ? or something else ?

       

      Thanks for your help in advance.

        • 1. Re: in jbpm 4.3, timer not firing to leave its state node.
          HuiSheng Xu Master

          Hi Tun,

           

          Could you import the jbpm.jobexecutor.cfg.xml into your jbpm.cfg.xml?  Without using it, the timer/job won't be executed.

          • 2. Re: in jbpm 4.3, timer not firing to leave its state node.
            Tun Mang Novice

            Hi HuiSheng:

             

            The following is my jbpm.cfg.xml for jbpm 4.3:

             

            <?xml version="1.0" encoding="UTF-8"?>
            <jbpm-configuration>
              <import resource="jbpm.default.cfg.xml" />
              <import resource="jbpm.jpdl.cfg.xml" />
              <import resource="jbpm.identity.cfg.xml" />   
              <import resource="jbpm.tx.hibernate.cfg.xml" />
              <import resource="jbpm.variable.types.xml" />
              <import resource="jbpm.jobexecutor.cfg.xml" /> 
              <import resource="jbpm.businesscalendar.cfg.xml" /> 
              <import resource="jbpm.jpdl.cfg.xml" /> 
              <import resource="jbpm.mail.templates.examples.xml" /> 
            </jbpm-configuration>

             

            The following is the sequence of our test activities :

             

                (1) deploy the .jpdl.xml which contains the state node associated with a timer :

             

            <?xml version="1.0" encoding="UTF-8"?>

            <process name="test_Timer_1">

               <start g="270,34,54,49" name="start1">    

                  <transition to="generate-file"/>

               </start>

               <state g="222,123,147,40" name="generate-file">

                  <transition g="-71,-15" name="timeout" to="remove-file">             

                    <timer duedate="10 seconds"/>  

                  </transition>          

               </state>

               <state g="222,214,147,40" name="remove-file">     

                  <transition to="end1"/>    

               </state>       

               <end g="272,302,48,48" name="end1"></end>    

            </process>

             

                (2) run the start process instance:

             

                (3) so we assume that the token entered the "generate-file" node and waited more that 10 seconds, but we still only saw 2 entries in the jpbm4_execution table.

             

               (4) then we deploy one more time, and now we saw the "remove-file" activity entry created in the jpbm4_execution table.

             

            There must be something wrong, but we can not figure out from the jbpm cfg related xml files.

             

            Thanks for your help again.

             

             

             

             

             

             

            • 3. Re: in jbpm 4.3, timer not firing to leave its state node.
              Tun Mang Novice

              Hi :

               

              Is there a way to keep jbpm ProcessEngine alive in jboss by either configure jboss or jbpm ?

               

              What was found out is that the stand-alone application exited after initialized jbpm ProcessEngine and started the timer-test process instance. So the jbpm's "scheduler" or job execution is not waking up to run.

               

              Suppose the stand-alone application must exit after start the process instance (because it is not a daemon), and there is only "jpbm.jar" (not jpbm.war) residing in the following location :

               

                  ...\jboss\5.1.0.GA\common\lib\jpbm.jar

               

              Practically, if only jboss server will keep running, how to configure jboss or jbpm so that the "scheduler service" can keep the jbpm's "scheduler" or job execution wake up to fire the timeout event ? Sorry for if I use the wrong terms to describe jbpm's techonolgy.

               

              Thanks a lot for you help and time in advance.