use of org.camunda.bpm.engine.impl.persistence.StrongUuidGenerator in project camunda-bpm-platform by camunda.
the class StartProcessEngineStep method performOperationStep.
public void performOperationStep(DeploymentOperation operationContext) {
final PlatformServiceContainer serviceContainer = operationContext.getServiceContainer();
final AbstractProcessApplication processApplication = operationContext.getAttachment(PROCESS_APPLICATION);
ClassLoader classLoader = null;
if (processApplication != null) {
classLoader = processApplication.getProcessApplicationClassloader();
}
String configurationClassName = processEngineXml.getConfigurationClass();
if (configurationClassName == null || configurationClassName.isEmpty()) {
configurationClassName = StandaloneProcessEngineConfiguration.class.getName();
}
// create & instantiate configuration class
Class<? extends ProcessEngineConfigurationImpl> configurationClass = loadClass(configurationClassName, classLoader, ProcessEngineConfigurationImpl.class);
ProcessEngineConfigurationImpl configuration = createInstance(configurationClass);
// set UUid generator
// TODO: move this to configuration and use as default?
ProcessEngineConfigurationImpl configurationImpl = configuration;
configurationImpl.setIdGenerator(new StrongUuidGenerator());
// set configuration values
String name = processEngineXml.getName();
configuration.setProcessEngineName(name);
String datasourceJndiName = processEngineXml.getDatasource();
configuration.setDataSourceJndiName(datasourceJndiName);
// apply properties
Map<String, String> properties = processEngineXml.getProperties();
setJobExecutorActivate(configuration, properties);
PropertyHelper.applyProperties(configuration, properties);
// instantiate plugins:
configurePlugins(configuration, processEngineXml, classLoader);
if (processEngineXml.getJobAcquisitionName() != null && !processEngineXml.getJobAcquisitionName().isEmpty()) {
JobExecutor jobExecutor = getJobExecutorService(serviceContainer);
ensureNotNull("Cannot find referenced job executor with name '" + processEngineXml.getJobAcquisitionName() + "'", "jobExecutor", jobExecutor);
// set JobExecutor on process engine
configurationImpl.setJobExecutor(jobExecutor);
}
// start the process engine inside the container.
JmxManagedProcessEngine managedProcessEngineService = createProcessEngineControllerInstance(configuration);
serviceContainer.startService(ServiceTypes.PROCESS_ENGINE, configuration.getProcessEngineName(), managedProcessEngineService);
}
Aggregations