cancel
Showing results for 
Search instead for 
Did you mean: 

Start event timer not firing.

nikz2
Champ in-the-making
Champ in-the-making
I am still learning activiti.
I am trying to do some simple process, that shows a message every minute.
So i declare
<c>
    <startEvent id="timerstartevent1" name="Timer start">
      <timerEventDefinition>
        <timeDuration>PT1M</timeDuration>
      </timerEventDefinition>
    </startEvent>
</c>
Inside context.xml
<c>
  <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
    <property name="dataSource" ref="dataSource" />
    <property name="transactionManager" ref="transactionManager" />
    <property name="databaseSchemaUpdate" value="true" />
    <property name="jobExecutorActivate" value="true" />
    <property name="asyncExecutorEnabled" value="true" />
    <property name="asyncExecutorActivate" value="true" />
     <property name="deploymentResources"
    value="classpath*:diagrams/autodeploy.*.bpmn" />
  </bean>
</c>

My service Task

public class HelloAccountService  implements JavaDelegate  {
   
   @Override
   public void execute(DelegateExecution execution) throws Exception {
      
      ClassPathXmlApplicationContext applicationContext = new ClassPathXmlApplicationContext(
            "data-layer-context.xml");
      AccountService accServ = (AccountService)applicationContext.getBean("accountService");
      Account acc = accServ.getAccount("A7UJ9A0000YZ");
      JOptionPane.showMessageDialog(null, acc.getAccount());
   }

}


As i understood, that's must be enough with process deployed. But it's not working.
By the way, which would be the best way to inject data access services into my task class?
1 REPLY 1

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi,

Could you create jUnit test? (http://forums.activiti.org/content/sticky-how-write-unit-test)
(May  be you did not add repetitions to the timer)

Regards
Martin