I am trying to use a timer event - but without success.
<intermediateCatchEvent id="timerCatchEvent"> <timerEventDefinition> <timeDuration>PT10S</timeDuration> </timerEventDefinition> </intermediateCatchEvent>
The workflows stucks on the timeCatchEvent - it never proceeds.
Could it be a configuration problem? My configuration looks like this:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="transactionManager" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="java:jboss/TransactionManager"></property> <property name="resourceRef" value="true" /> </bean> <bean id="processEngineConfiguration" class="org.activiti.cdi.CdiJtaProcessEngineConfiguration"> <property name="dataSourceJndiName" value="java:jboss/datasources/ExampleDS" /> <property name="databaseType" value="h2" /> <property name="transactionManager" ref="transactionManager" /> <property name="transactionsExternallyManaged" value="true" /> <property name="databaseSchemaUpdate" value="true" /> </bean> </beans>
I am working with Activiti 6.0.0, JSF 2.2 and CDI 2.0 on a WildFly 17.0.1.Final
Solved! Go to Solution.
Okay. It works now. But to be honest, I don't know why.
What definitely is neccessary is to enable asyncExecutorActivate in the configuration. But I tried that before. Without success. So at that time there must have been something else that didn't work.
During debugging I noticed that "insertTimerJob" wasn't executed (via DefaultSqlSession.update). But now it is! And I'd say I didn't make any significant modifications to my code or activiti configuration. So why didn't it work in the first place? I have no idea.
BTW, logging via an event listener shows: the last event received is a TIMER_SCHEDULED event.
Some debugging revealed: ExecutionEntityImpl.ensureTimerJobsInitialized does not find any timer jobs for the execution id. But the execution id seems to be correct.
Okay. It works now. But to be honest, I don't know why.
What definitely is neccessary is to enable asyncExecutorActivate in the configuration. But I tried that before. Without success. So at that time there must have been something else that didn't work.
During debugging I noticed that "insertTimerJob" wasn't executed (via DefaultSqlSession.update). But now it is! And I'd say I didn't make any significant modifications to my code or activiti configuration. So why didn't it work in the first place? I have no idea.
Hi,
Glad you got it working & thanks for updating your post - it's really helpful for other users.
Kind regards,
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.