1 Reply Latest reply on May 19, 2006 1:51 AM by pganesh81

    Timer Issue

    pganesh81 Newbie

      I need to implement a timer in my Process. But I need to assign the duedate dynamically. With the input from the user interface I would calculate the number of business days and assign the duedate of the timer. Is this possible?

      I read the forum related to this issue, but i could not find right solution.
      Also i need to know how to implement create-timer and cancel-timer. I am using jbpm-starters-kit-3.1 and eclipse 3.1

      Could anyone help me.

        • 1. Re: Timer Issue
          pganesh81 Newbie

          I solved the problem.

          I used a node whose actionhandler will create a timer. Below is the code for actionhandler and the process definition.

          This is the actionHandler creating Timer
          public void execute(ExecutionContext executionContext){
           //executionContext.getJbpmContext().getGraphSession().saveProcessInstance(executionContext.getProcessInstance() );
           jbpmContext = executionContext.getJbpmContext();
           jbpmContext.save(executionContext.getProcessInstance() );
           CreateTimerAction cta = new CreateTimerAction();
           cta.setDueDate("1 minutes");
           cta.setTransitionName("myTransition" );
           catch(Exception ex){
          This is the description of Node in process-definition.xml
          <node name="node1">
           <action class="org.jbpm.webapp.bean.savePersistence"></action>
           <transition name="myTransition" to="salefork"></transition>