1 Reply Latest reply on Apr 15, 2007 9:35 AM by Sadegh Aliakbary

    How to run a timer

    Sadegh Aliakbary Newbie

      Hi All
      I want to use timer for a task but I'm not sure about the way. I have added a timer to my task node(avan-task-node is extended from task-node), but it does not work. I expect that after 30seconds the node is leaved to "someTransition"

      <avan-task-node name="Review" label="review">
       <timer name="timer1" duedate="30 seconds" transition="someTransition">
       </timer>
      .
      .
      .
      </avan-task-node>
      
      


      Is it correct? Should I do anything else? e.g. should I add something to web.xml to run a scheduler thread?

      Thanks in advance

        • 1. Re: How to run a timer
          Sadegh Aliakbary Newbie

          Hi again
          According to some posts on this forum, I added these lines 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>
          


          But now every 5 seconds I see an exception :

          org.hibernate.HibernateException: /hibernate.cfg.xml not found
          at org.hibernate.util.ConfigHelper.getResourceAsStream(ConfigHelper.java:147)
          at org.hibernate.cfg.Configuration.getConfigurationInputStream(Configuration.java:1287)
          at org.hibernate.cfg.Configuration.configure(Configuration.java:1309)
          at org.hibernate.cfg.Configuration.configure(Configuration.java:1296)
          at org.jbpm.db.hibernate.HibernateHelper.createConfiguration(HibernateHelper.java:93)
          at org.jbpm.persistence.db.DbPersistenceServiceFactory.getConfiguration(DbPersistenceServiceFactory.java:68)
          at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90)
          at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74)
          at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:78)
          at org.jbpm.persistence.db.DbPersistenceService.getMessagingSession(DbPersistenceService.java:234)
          at org.jbpm.JbpmContext.getMessagingSession(JbpmContext.java:411)
          at org.jbpm.msg.db.DbMessageService.<init>(DbMessageService.java:49)
          at org.jbpm.msg.db.DbMessageServiceFactory.openService(DbMessageServiceFactory.java:32)
          at org.jbpm.svc.Services.getService(Services.java:136)
          at org.jbpm.svc.Services.getMessageService(Services.java:172)
          at org.jbpm.msg.command.CommandExecutorThread.executeCommand(CommandExecutorThread.java:111)
          at org.jbpm.msg.command.CommandExecutorThread.run(CommandExecutorThread.java:79)


          (I'm using springmodules to integrate jbpm to my project, so I have not any hibernate.cfg.xml file)
          Any idea?