|
@@ -16,6 +16,7 @@ import org.flowable.common.engine.impl.cfg.IdGenerator;
|
|
|
import org.flowable.common.engine.impl.persistence.deploy.DeploymentCache;
|
|
|
import org.flowable.engine.impl.persistence.deploy.ProcessDefinitionCacheEntry;
|
|
|
import org.flowable.engine.parse.BpmnParseHandler;
|
|
|
+import org.flowable.job.service.impl.asyncexecutor.JobManager;
|
|
|
import org.flowable.spring.SpringProcessEngineConfiguration;
|
|
|
import org.flowable.spring.boot.EngineConfigurationConfigurer;
|
|
|
import org.flowable.task.service.impl.DefaultTaskPostProcessor;
|
|
@@ -38,6 +39,8 @@ public class FlowableConfigure implements EngineConfigurationConfigurer<SpringPr
|
|
|
@Autowired(required = false)
|
|
|
private DefaultTaskPostProcessor taskPostProcessor;
|
|
|
@Autowired(required = false)
|
|
|
+ private JobManager jobManager;
|
|
|
+ @Autowired(required = false)
|
|
|
private DeploymentCache<ProcessDefinitionCacheEntry> deploymentCache;
|
|
|
|
|
|
@Override
|
|
@@ -56,21 +59,26 @@ public class FlowableConfigure implements EngineConfigurationConfigurer<SpringPr
|
|
|
BpmnXMLConverter.addConverter(new CopyServiceTaskXMLConverter());
|
|
|
BpmnXMLConverter.addConverter(new CustomServiceTaskXMLConverter());
|
|
|
if (Objects.nonNull(this.objectMapper)) {
|
|
|
- engineConfiguration.setObjectMapper(objectMapper);
|
|
|
+ engineConfiguration.setObjectMapper(this.objectMapper);
|
|
|
}
|
|
|
if (Objects.nonNull(this.idGenerator)) {
|
|
|
- engineConfiguration.setIdGenerator(idGenerator);
|
|
|
+ engineConfiguration.setIdGenerator(this.idGenerator);
|
|
|
}
|
|
|
- if (Objects.nonNull(taskPostProcessor)) {
|
|
|
- engineConfiguration.setTaskPostProcessor(taskPostProcessor);
|
|
|
+ if (Objects.nonNull(this.taskPostProcessor)) {
|
|
|
+ engineConfiguration.setTaskPostProcessor(this.taskPostProcessor);
|
|
|
}
|
|
|
if (Objects.nonNull(this.transactionManager)) {
|
|
|
- engineConfiguration.setTransactionManager(transactionManager);
|
|
|
+ engineConfiguration.setTransactionManager(this.transactionManager);
|
|
|
}
|
|
|
if (Objects.nonNull(this.deploymentCache)) {
|
|
|
- engineConfiguration.setProcessDefinitionCache(deploymentCache);
|
|
|
+ engineConfiguration.setProcessDefinitionCache(this.deploymentCache);
|
|
|
engineConfiguration.setProcessDefinitionCacheLimit(1000);
|
|
|
// engineConfiguration.setProcessDefinitionDataManager(new CustomProcessDefinitionDataManager(engineConfiguration, this.deploymentCache));
|
|
|
}
|
|
|
+ if (Objects.nonNull(this.jobManager)) {
|
|
|
+ engineConfiguration.setAsyncExecutorActivate(true);
|
|
|
+ engineConfiguration.setAsyncExecutorMessageQueueMode(true);
|
|
|
+ engineConfiguration.setJobManager(jobManager);
|
|
|
+ }
|
|
|
}
|
|
|
}
|