Start event timer not firing.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-23-2015 08:07 AM
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
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?
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?
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2015 02:29 AM
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
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
