3 Replies Latest reply on Oct 26, 2009 12:01 PM by Massimo Di Fant

    Action associated with timer is not invoked

    Massimo Di Fant Newbie

      Hi, I am using Jbpm 3.2.3 on Jboss 4.2.3.GA.

      I have the following simple process:

      <?xml version="1.0" encoding="UTF-8"?>
      <process-definition xmlns="" name="sample">
       <start-state name="start">
       <transition to="state"></transition>
       <state name="state">
       <timer name="two-seconds" duedate="2 seconds" transition="to-decision">
       <action name="handler" class="sample.TimerHandler"></action>
       <transition to="decision" name="to-decision"></transition>
       <decision name="decision">
       <handler class="sample.MyDecisionHandler"></handler>
       <transition to="end" name="OK"></transition>
       <transition to="state" name="KO"></transition>
       <end-state name="end"></end-state>

      The idea is that I perform a check in TimerHandler every 2 seconds, then I set some variable that MyDecisionHandler will use to take "OK" or "KO" transition.

      I have deployed the process archive with the two classes (TimerHandler and MyDecisionHandler) and then I use jbpm console to signal process.
      When I enter to "state" state and I click signal, the class action associated to the timer (sample.TimerHandler) will never be called.

      Why? I have to do other things to creater timer or is a configuration problem in jbpm.cfg.xml? I have added the entry:

      <bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor" singelton="true" />

      and jbpm-enterprise.jar is deployed in Jboss.


        • 1. Re: Action associated with timer is not invoked
          Adolf Grazou Newbie


          Had a similar problem, the solution was to add the business calandar and set it properly. (apparently required by the jobexecutor to determine durations)

          • 2. Re: Action associated with timer is not invoked
            Adolf Grazou Newbie


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

            • 3. Re: Action associated with timer is not invoked
              Massimo Di Fant Newbie

              Thanks for you reply. I also think that the problem is in configuration. Actually my jbpm.cfg.xml is

               <!-- configuration property used by persistence service impl org.jbpm.persistence.db.DbPersistenceServiceFactory -->
               <string name="resource.hibernate.cfg.xml" value="hibernate.cfg.xml" />
               <!-- configuration resource files pointing to default configuration files in jbpm-jpdl.jar -->
               <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />
               <string name="resource.default.modules" value="org/jbpm/graph/def/jbpm.default.modules.properties" />
               <string name="resource.converter" value="org/jbpm/db/hibernate/jbpm.converter.properties" />
               <string name="resource.action.types" value="org/jbpm/graph/action/action.types.xml" />
               <string name="resource.node.types" value="org/jbpm/graph/node/node.types.xml" />
               <string name="resource.parsers" value="org/jbpm/jpdl/par/jbpm.parsers.xml" />
               <string name="resource.varmapping" value="org/jbpm/context/exe/jbpm.varmapping.xml" />
               <string name="resource.mail.templates" value="jbpm.mail.templates.xml" />
               <int name="jbpm.byte.block.size" value="1024" singleton="true" />
               <string name="jbpm.mail.smtp.host" value="localhost" />
               <bean name="jbpm.task.instance.factory" class="org.jbpm.taskmgmt.impl.DefaultTaskInstanceFactoryImpl" singleton="true" />
               <bean name="jbpm.variable.resolver" class="org.jbpm.jpdl.el.impl.JbpmVariableResolver" singleton="true" />
               <bean name="jbpm.mail.address.resolver" class="org.jbpm.identity.mail.IdentityAddressResolver" singleton="true" />
               <bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor" singelton="true" />

              As you see I have the entry:
              <string name="resource.business.calendar" value="org/jbpm/calendar/jbpm.business.calendar.properties" />

              Is it the same of
              <import resource="jbpm.businesscalendar.cfg.xml"/>

              as you have wrote?
              Otherwise, where can I find and define the resources "jbpm.jobexecutor.cfg.xml" and "jbpm.businesscalendar.cfg.xml" ?