Job Lock Time Configuration

Hey folks,

In my use case i have a few delegates that have somewhat lengthier run time then 5 minutes limit that the default Job Executor keeps 1 job locked. I have tried time and time again to increase this through spring-boot yml configuration, but have not suceeded. Any help would be most appreciated.

Namely, from https://github.com/camunda/camunda-docs-manual/blob/master/content/user-guide/spring-boot-integration/configuration.md i have tried setting:

camunda.bpm.job-execution.lock-time-in-millis: 500000
(as well as camunda.bpm.job-execution.lockTimeInMillis: 500000 out of desperation).
I have also tried few other permutations with job-acquisition as child of job-execution (from reference/deployment-descriptors/tags/job-executor), but to no avail. Whenever i checked LOCK_EXP_TIME_ column in ACT_RU_JOB, it was set 5 minutes from start time.

I apologize as i am not best with process engine (bean) configurations as i have been spoiled with spring-boot easy way of configuring settings. Is this perhaps problem since application is running inside embedded tomcat?

I also dug through some code on git (https://github.com/camunda/camunda-bpm-spring-boot-starter/blob/master/starter/src/main/java/org/camunda/bpm/spring/boot/starter/property/JobExecutionProperty.java) and have noticed that my project version of org.camunda.bpm.spring.boot.starter.property.JobExecutionProperty has none of the properties on lines 40-47 on git, amongst which is lockTimeInMillis. I am running <camunda.springboot.version>2.3.0</camunda.springboot.version> so i am not sure if problem is with version or something else?

Thanks!

Hi @Ledu,

have a look at this example: https://github.com/abhi42/camundacon2018/blob/master/async/src/main/java/ch/generali/camundacon18/async/AsyncCamundaBpmProcessApplication.java.

Does it help you?

Cheers, Ingo

2 Likes

To add to Ingo’s response: The configuration properties you found are only available in Camunda Spring Boot Starter 3.1.0, which is not released yet.

Cheers,
Thorben

1 Like

Yes, this is perfect guys. Thanks a lot!

Here is the part of the code:

    @Bean
	@Primary
	public JobExecutor getJobExecutor(@Qualifier(CAMUNDA_TASK_EXECUTOR_QUALIFIER) final TaskExecutor taskExecutor)
	{
		JobExecutionProperty jobExecutionProperty = new JobExecutionProperty();
		jobExecutionProperty.setLockTimeInMillis(lockTimeInMillis);

		CamundaBpmProperties properties = new CamundaBpmProperties();
		properties.setJobExecution(jobExecutionProperty);

		final JobExecutor jobExecutor = DefaultJobConfiguration.JobConfiguration.jobExecutor(taskExecutor, properties);

		log.info("Lock time in millies: {}", jobExecutor.getLockTimeInMillis());

		return jobExecutor;
	}