Hi,
We are using Camunda7 specifically version 7.16.
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bom</artifactId>
<version>7.16.0</version>
<scope>import</scope>
<type>pom</type>
</dependency>
As mentioned in a previous post here we are creating the process engine in this manner
processEngineConfiguration
.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE)
.setHistory(ProcessEngineConfiguration.HISTORY_NONE)
.setProcessEngineName(camundaConfig.getProcessEngineName())
.setJdbcMaxActiveConnections(200)
.setJdbcMaxIdleConnections(200)
.setJdbcUrl(camundaDatabaseConfig.getJdbcUrl())
.setJdbcUsername(camundaDatabaseConfig.getUsername())
.setJdbcPassword(camundaDatabaseConfig.getPassword())
.setJobExecutor(new CustomJobExecutor())
.setJobExecutorActivate(camundaConfig.isJobExecutorActivate());
Also we have a custom job executor with the following configuration
public class CustomJobExecutor extends DefaultJobExecutor {
public CustomJobExecutor() {
this.corePoolSize = 16;
this.maxPoolSize = 16;
this.queueSize = 1000000;
this.maxJobsPerAcquisition = 6500;
}
}
For the database we are using Oracle Autonomous DB. We are instantiating the process instance by key using
RuntimeService runtimeService =
ProcessEngines.getProcessEngine("MyOrchestrator").getRuntimeService();
runtimeService.startProcessInstanceByKey("create_workflow", variables);
However I notice that submitting the time taken to execute startProcessInstanceByKey
takes in the order of 3 seconds.
After submitting the request it takes another 5 seconds for the task to be picked up. The task is implemented by extended JavaDelegate
Is there anything obvious we are missing here.
Another question is why is the startProcessInstanceByKey
calling the database everytime to get the process definition. Can we cache this information anywhere to speed things up. Let me know if you want further clarification on this.