Timer event is not working

Hello,

I have created a simple work flow. I have set the timer to 5 seconds and after completing the 5 seconds, its not set to next task.

How do I proceed?
How do I test, timer?
What need to be done additionally?

Is there any simple project/reference on timer event, to know more in detail.

Duration => P0Y0M0DT0H0M5S

Thanks & Regards
Harshal Temkar

Hi Harshal,

did you activate the job executor? If not, the timer event is not processed by the process engine.

In a unit test, you can use the JobExecutor to find and execute timer jobs. For an integration test, you can activate the job executor and manipulate the current time using the ClockUtil.

You can find all informations about timer events in the User Guide.

By the way, a duration of 5 seconds can also be specified as “PT5S”.

Greetings,
Philipp

Hello Philipp,

Could you please elaborate/provide an example to understand better.

I have enabled/included Job Executor in my app (property name=“jobExecutorActivate” value=“true” in camunda.cfg.xml), but still its not working.

Thanks and Regards
Harshal Temkar

Hi @Harshal_Temkar,

Can you please post the sources of your application (or a minimal version of it that reproduces the problem) or a failing test case, e.g. on github?

Thanks,
Thorben

Hello Thorben,

Here is my process defined

process.bpmn (5.5 KB)

Hi,

The process works perfectly fine on Camunda 7.4.0 for me. It may take a little longer than five seconds for the job executor to pick up the job if you have an otherwise empty job table, because the job acquisition thread becomes idle and polls less regularly when there is no work to do.

Cheers,
Thorben

Hello Thorben,

Thanks for your reply

Could you please share the source of this simple project to understand better.
I wanted to know what am I really missing.

Thanks and Regards
Harshal Temkar

Hi,

You can use the servlet-process-application example, see https://github.com/camunda/camunda-bpm-examples/tree/master/deployment/servlet-pa

Add your BPMN XML to src/main/resources, build the application, deploy it to the standard Camunda BPM Tomcat distribution, and start the process via tasklist.

Cheers,
Thorben

Hello @Harshal_Temkar, hello @thorben,
I am using Camunda version 7.8 currently and it works only if <property name="jobExecutorDeploymentAware">true</property> (in bpm-platform.xml) is commented, deleted or set to false.

I hope that will help to somebody.

1 Like

Hi Jan, you saved my day!!!

Even very simple timers (like attached example) did not work.
simple_timer_events
What effect has jobExecutorDeploymentAware = false?

It was the same problem with me some month ago.
https://forum.camunda.io/t/timer-hungs-after-server-reboot/9300
The solution was to set jobExecutorDeploymentAware=false