2 Replies Latest reply on Apr 2, 2009 1:38 PM by Ronald van Kuijk

    jBPM timer and scheduler

    François LE QUEMENER Newbie

      Hi,
      I'm posting here because I can't find lot's of information about how to set up timers in jBPM.

      I've added a timer to my task :

      <timer name="waitForApproval"
       duedate="1 minute"
       transition="validee" >
       <script>
       System.out.println("Le valideur est trop lent : validée !!!");
       </script>
       </timer>


      It seems timers need what you call a scheduler service. After some researches, I find out that I must add this to my web.xml :
       <servlet>
       <servlet-name>JbpmThreadsServlet</servlet-name>
       <servlet-class>org.jbpm.web.JbpmThreadsServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet-mapping>
       <servlet-name>JbpmThreadsServlet</servlet-name>
       <url-pattern>/threads</url-pattern>
       </servlet-mapping>
      


      I did that, but I find an exception :
      java.lang.ClassNotFoundException: org.jbpm.web.JbpmThreadsServlet

      And surprise! There is no such class in my jbpm jar file. I took the last one from jbpm-installer-3.2.6.SP1.jar : jbpm-jpdl.jar

      On JarSearch, I found that the class is present only in version jbpm-3.1.4.jar and before.

      So what am I doing wrong, or what did I miss?

      Thanks