1 Reply Latest reply on Nov 23, 2005 11:01 AM by Jens Briesofsky

    Help with Timers

    Jens Briesofsky Newbie

      I am trying to implement a behaviour in jbpm where a failed operation is retried a number of times with some delay between retries.

      I am using the 3.1.alpha.

      the problem seems to arise in the Timer for the delay which I specified like this:

      <state name="wait2minutes">
       <transition name="timeElapsed" to="doOperation"/>
       <timer name='retryDelay'
       duedate='2 minutes'
       transition='timeElapsed' >

      when I create the task from the webapp the timer and the transition is executed once, so the operation gets executed again. If this attempt fails again the process gets stuck in "wait2minutes" forever, no timer entry is created in "jbpm_timers"

      When I create such a processinstance programmatically (running inside jboss) the process gets stuck there on the first attempt.

       ProcessDefinition processDefinition =
       ProcessInstance processInstance =
       new ProcessInstance(processDefinition);
       Token token = processInstance.getRootToken();
       assertEquals("start", token.getNode().getName());

      what am I doing wrong here? Any hints appreciated...