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?