Timer in intermediateCatchEvent not working

cancel
Showing results for 
Search instead for 
Did you mean: 
tdtappe
Active Member II

Timer in intermediateCatchEvent not working

Jump to solution

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

1 Solution

Accepted Solutions
tdtappe
Active Member II

Re: Timer in intermediateCatchEvent not working

Jump 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.

View solution in original post

3 Replies
tdtappe
Active Member II

Re: Timer in intermediateCatchEvent not working

Jump to solution

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.

tdtappe
Active Member II

Re: Timer in intermediateCatchEvent not working

Jump 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.

EddieMay
Alfresco Employee

Re: Timer in intermediateCatchEvent not working

Jump to solution

Hi,

Glad you got it working & thanks for updating your post - it's really helpful for other users.

Kind regards,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!