01-14-2020 10:12 AM
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
01-15-2020 05:06 AM
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.
01-15-2020 03:14 AM
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.
01-15-2020 05:06 AM
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.
01-15-2020 05:44 AM
Hi,
Glad you got it working & thanks for updating your post - it's really helpful for other users.
Kind regards,
Explore our Alfresco products with the links below. Use labels to filter content by product module.