Timer not working in Camunda 7.5.3 using PT3S

I have a timer on a simple workflow that has a timer event duration of PT3S. I confirmed the job executor started successfully at startup. The timer seems to only recognize a smallest unit of a minute. So the timer does trigger, but after a minute. I tested this timer it always triggers at 1 minute. The same BPMN was working just fine in 7.3.2 where the timer was triggered in 3 seconds.

Thoughts, recommendations, suggestions?

Thanks!
Atul

Hi Atul Tewari,

You can find the answer in below post

(You need to change maxWait property of job-acquisition properties which is set to 60000 by default “1 minute” - should be 3000 or less in your case)

1 Like

Hi Atul

I would also mention that timers are best interpreted as ‘will fire after the expiration time’. Hence as far as BPMN is concerned, the meaning should be interpreted as ‘will not happen before…’ as opposed to ‘will happen at…’

As pointed out though, there are system parameters and behaviours which can influence the actual timer latency…

regards

Rob

2 Likes

Thanks Hassang and Rob. I added the following to bpm-platform.xml and restarted WAS 8.5.5. (Websphere)

<job-executor> <job-acquisition name="default" > <properties> <property name="maxWait">1000</property> </properties> </job-acquisition> </job-executor>

It did not make a difference. In fact, the behavior was exactly the same - 60 seconds delay. Are there any other config properties that need to be set? I also noticed the job-executor properties are limited to Tomcat. Are job-acquisition properties also limited to Tomcat, and if so, it obviously will not affect the behavior of our Websphere 8.5.5 env.

Thanks again for you prompt responses. Let me know if there are other properties to be changed as well.

Hi Atul Tewari,

It seems you used the wrong property name for configuring the job-acquisition.
The reason the job-executor properties are only supported on Tomcat is that the threadpool used by the job-executor is managed by Camunda itself on Tomcat. The threadpool on JavaEE servers (besides JBoss/Wildfly) is managed by a so called ‘workmanager’ using the JavaEE features of the the Java Connector Architecture (JCA) specification. See here how the Job-Executor, the Threadpool and the Job-Acquistion play together.
So in short, the correct property you want to set is the ‘waitTimeInMillis’ on the job-acquisition element like in the example below.
See here for more properties the job-acquisition supports.

Example:

    <properties>
      <property name="maxJobsPerAcquisition">5</property>
      <property name="waitTimeInMillis">8000</property>
      <property name="lockTimeInMillis">400000</property>
    </properties>
  </job-acquisition>```

Cheers,
Christian
2 Likes

@hawky4s Both waitTimeInMillis & maxWait should be set to 3000 in this case, Right?

2 Likes

Thanks Christian and Hassan. I tried the following and restarted WAS. It still did not help.

<job-executor> <job-acquisition name="default"> <properties> <property name="waitTimeInMillis">1000</property> <property name="maxWait">1000</property> </properties> </job-acquisition> </job-executor>

When using Camunda 7.3.2, none of these properties were set in bpm-platform.xml. In fact, we have two environments (Camunda 7.3.2 and Camunda 7.5.3) running the same BPMN and integration test, and the test fails only in the Camunda 7.5.3 environment. It appears Job Executor has changed from 7.3.2 to 7.5.3.

It has the same 60 seconds delay.

Any further insight would be greatly appreciated.

Thanks!
Atul

Hi atultewari,

May we have a look at your bpm-platform.xml file

1 Like

Sure - here you go

<?xml version="1.0" encoding="UTF-8"?> 1000 1000 default org.camunda.bpm.engine.impl.cfg.WebsphereProcessEngineConfiguration jdbc/ProcessEngine full true true true org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin org.camunda.spin.plugin.impl.SpinProcessEnginePlugin org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin <!-- org.camunda.bpm.identity.impl.ldap.plugin.LdapIdentityProviderPlugin
      <property name="serverUrl">ldaps://localhost:4334/</property>
      <property name="acceptUntrustedCertificates">false</property>
      <property name="managerDn">uid=jonny,ou=office-berlin,o=camunda,c=org</property>
      <property name="managerPassword">s3cr3t</property>

      <property name="baseDn">o=camunda,c=org</property>

      <property name="userSearchBase"></property>
      <property name="userSearchFilter">(objectclass=person)</property>

      <property name="userIdAttribute">uid</property>
      <property name="userFirstnameAttribute">cn</property>
      <property name="userLastnameAttribute">sn</property>
      <property name="userEmailAttribute">mail</property>
      <property name="userPasswordAttribute">userpassword</property>

      <property name="groupSearchBase"></property>
      <property name="groupSearchFilter">(objectclass=groupOfNames)</property>
      <property name="groupIdAttribute">cn</property>
      <property name="groupNameAttribute">cn</property>

      <property name="groupMemberAttribute">member</property>

    </properties>
  </plugin>
  -->
     <!-- LDAP CONFIGURATION -->
     <!-- The following plugin allows you to grant administrator authorizations to an existing LDAP user -->
     <!--
  <plugin>
    <class>org.camunda.bpm.engine.impl.plugin.AdministratorAuthorizationPlugin</class>
    <properties>
      <property name="administratorUserName">admin</property>
    </properties>
  </plugin>
  -->
  </plugins>

Hi atultewari,
Can you send it as attachment?

Thanks…

1 Like

Not sure why the editor changed the layout See attached file below
bpm-platform.xml (3.5 KB)

Hassan,
Looks like the bm-platform.xml change is the only change I needed. It is now working correctly. Thank you Hassan, Christian, and Rob. I really appreciate your quick and accurate responses.

Atul

See this post on how to format code.

Cheers,
Thorben

1 Like

what is the change you made?

1 Like

Any idea what the necessary change was? I have the exact same problem with PT10S using Camunda Platform 7.15

Hi, are you using Tomcat or a different app server?

R