actually I’m developing a Camunda Spring Boot application (Kotlin instead of Java). My problem is, that my “async before” tasks wont be executed by the job executor.
In my application.properties I have set (should be the default value)
camunda.bpm.job-execution.enabled = true
When I start my spring boot application, the log tells me:
2018-10-07 22:33:45.070 INFO 5289 --- [ost-startStop-1] org.camunda.bpm.spring.boot : STARTER-SB040 Setting up jobExecutor with corePoolSize=3, maxPoolSize:10
2018-10-07 22:33:45.079 INFO 5289 --- [ost-startStop-1] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'camundaTaskExecutor'
2018-10-07 22:33:45.208 INFO 5289 --- [ost-startStop-1] org.camunda.bpm.engine.cfg : ENGINE-12003 Plugin 'CompositeProcessEnginePlugin[genericPropertiesConfiguration, camundaProcessEngineConfiguration, camundaDatasourceConfiguration, camundaJpaConfiguration, camundaJobConfiguration, camundaHistoryConfiguration, camundaMetricsConfiguration, camundaAuthorizationConfiguration, failedJobConfiguration, disableDeploymentResourcePattern]' activated on process engine 'default'
2018-10-07 22:33:45.211 INFO 5289 --- [ost-startStop-1] org.camunda.bpm.spring.boot : STARTER-SB020 ProcessApplication enabled: autoDeployment via springConfiguration#deploymentResourcePattern is disabled
2018-10-07 22:33:47.349 INFO 5289 --- [ost-startStop-1] org.camunda.bpm.engine : ENGINE-00001 Process Engine default created.
2018-10-07 22:33:50.894 INFO 5289 --- [ main] org.camunda.bpm.engine.jobexecutor : ENGINE-14014 Starting up the JobExecutor[org.camunda.bpm.engine.spring.components.jobexecutor.SpringJobExecutor].
2018-10-07 22:33:50.895 INFO 5289 --- [ingJobExecutor]] org.camunda.bpm.engine.jobexecutor : ENGINE-14018 JobExecutor[org.camunda.bpm.engine.spring.components.jobexecutor.SpringJobExecutor] starting to acquire jobs
So the Job Executor should be active. But my delegate code isn’t executed. If I will make the task “sync (async before is false)”, the delegate will be executed.
Is there some other configuration, that I have to set?
So, I have found more details but not a solution for my problem.
I started to create a simple tiny sample project with the base of my real one. And there it works… (Hmmm) So I have started to compare both projects.
It wont longer work, if I change the datasource from embedded h2 to mariadb (is running inside a docker container)
This is my application.properties file using maria db:
# ===============================
# SPRING
# ===============================
spring.datasource.url = jdbc:mariadb://localhost:8889/databasename
spring.datasource.username = username
spring.datasource.password = secret
spring.datasource.driver-class-name = org.mariadb.jdbc.Driver
spring.jpa.show-sql=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MariaDBDialect
# Relevant fuer "UPPER_CASE" Schreibweise - aber es muss dann mit @Table/@Column gearbeitet werden
spring.jpa.hibernate.naming.physical-strategy = org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.servlet.multipart.max-file-size = 8MB
spring.servlet.multipart.max-request-size = 8MB
# ===============================
# CAMUNDA
# ===============================
camunda.bpm.database.type = mariadb
camunda.bpm.job-execution.enabled = true
camunda.bpm.job-execution.active = true
#management.trace. TODO...
# ===============================
# LOGGING
# ===============================
logging.level.root = INFO
logging.level.org.springframework.security = DEBUG
logging.level.org.springframework.web = DEBUG
logging.level.de.sample = TRACE
I’ve got it working. After downgrading my mariadb from 10.2 to 10.0 the JobExecutor starts acquiring jobs. The documentation shows, that MariaDB 10.2 is supported:
Do you think, the batch processing flag must be set to false also for future versions of MariaDB? I have seen, that camunda will support with 7.10 also MariaDB 10.3.
Ideally, we will be able to support batch processing with 10.2 and future MariaDB versions, but first we need to understand the situation better. See https://app.camunda.com/jira/browse/CAM-8891 for our progress on this.