5 Replies Latest reply on May 11, 2009 1:53 AM by swatis

    Mutiple timers in a task node problem

    tal

      Hello,

      I'm adding a timer on a task node, and attaching the timer to an action with an expression,
      Then I'm adding another timer (with another action as an expression) to the same node,
      When I'm creating an instance of the deployed process, and looking on the task node, two jobs are created in the jbpm_job table,
      yet only one of them contains a value for GRAPHELEMENTTYPE_ and GRAPHELEMENT_ and the other contains nulls in both fields,

      When the due date of the first has arrived, the action is executed and the job is deleted from the table as expected,
      When the due date of the second arrives, it is deleted from the table yet the action not being executed,



      What could be the reason for that? do I have any configuration problem or it is a bug?
      I tried using the latest jbpm-jpdl snapshot, same behavior,



      Many thanks,


      Tal.

        • 1. Re: Mutiple timers in a task node problem
          trouby

          Hello,

          I had exactly the same problem with multiple timers in the same task node,

          Is there a solution for that problem? is it a known bug?



          Thanks,


          Asaf.

          • 2. Re: Mutiple timers in a task node problem
            kukeltje

            Guys (I think),

            As stated many times before, it is better in these kinds of situations to not describe your problem, but to make a unit test with EVERYTHING embedded (processdefinition as a string, actionhandlers as innerclasses etc....) that way we can better see what you do and try to reproduce etc...

            • 3. Re: Mutiple timers in a task node problem
              tal

              Hi,
              I've created an example process, one task node, two timers on it which represents two sla timers (i.e. should invoke an action that will send a reminder to the task actor if not acting on time), what happens is the same, first one is executed, second one is not, still the same differences in the database:

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

              <process-definition xmlns="" name="example">


              example_process


              <start-state name="start-state1">

              </start-state>


              <task-node name="task-node1">

              <assignment actor-id="ADMIN">


              <action name="action1" expression="#{wfAction.write('Action #1 invoked')}
              ">


              <action name="Action2" expression="#{wfAction.write('Action #2 invoked')}

              ">


              </task-node>


              <end-state name="end-state1"></end-state>


              </process-definition>


              ***************
              The WfAction class:


              @Name("wfAction")

              public class WfAction {

              public void write(String s) {
              System.out.println(s);
              }
              }

              • 4. Re: Mutiple timers in a task node problem
                tal

                Anyone tried to run the example process and know of a solution?
                I'm kinda stucked here...

                • 5. Re: Mutiple timers in a task node problem
                  swatis

                  hmm.. did u put any log messages in your second timer task's action handler class?