Hi, I’ve done some reading on this forum and have done all the things suggested in those threads. But I am not sure why my timer is not working as described here Timer Events | docs.camunda.org.
The timer is currently set to duration PT10S for testing. So I want to wait at the receive msg task for 10 seconds before either executing the success task or error task. I am able to send a msg within 10 seconds and at 30seconds and the success task will execute. I am also able to wait it out (usually around the 1min mark) and then the error task execute. But I am expecting the error task to execute after 10 seconds, not 1min.
I have also tried changing the duration to 30seconds. I get similar behaviour. I have done lots of testing. It seems that there is always a 50-55second delay.
I have an applicationContext.xml in src/webapp/WEB-INF with (sorry I had to add spaces in the xml below…)
I understand that the default value is 60000ms for waitTimeInMillis, which may possibly explain why I am getting 50-55second delays. Is there some way I can verify my config in bpm-platform.xml? Is there something else I am missing?
The concept to understand behind timer events is it should be interpreted as will not fire before the duration is up rather than will fire when the duration is up.
In your case, what is happening is the job executor being very lightly loaded will go to sleep for about a minute or so before waking up to see if there is a job (timer) to execute. You can change this parameter (maxwait) from say 60000 to 5000. This means the job executor will poll for jobs at least every 5 seconds rather than the current default 60 seconds.
Once again, keep in mind the meaning of a timer is wont activate before rather than will activate at…
Yes I thought this was the case but in my OP I mentioned I changed maxWait to 3000 but I am still seeing the same behaviour. So is there some way I can check this config is working or is there something I am missing?
So you did… Whats your deployment architecture - Tomcat etc? Embedded or shared engine etc?
The location of the config may depend on your deployment model. If its a shared engine for example, then you need to change the engine config, not your app…
Sorry I think it’s actually embedded. My application is a spring boot app and I have gone to the point where I have deployed my application to tomcat instead of using embedded tomcat. With this set up, I have tried putting bpm-platform.xml in the /conf folder and I am not seeing a difference in behaviour.
I still have bpm-platform.xml within the application itself.