use of org.camunda.bpm.engine.impl.repository.ProcessApplicationDeploymentBuilderImpl in project camunda-bpm-platform by camunda.
the class DeployCmd method registerProcessApplication.
protected ProcessApplicationRegistration registerProcessApplication(CommandContext commandContext, DeploymentEntity deployment, Set<String> processKeysToRegisterFor) {
ProcessApplicationDeploymentBuilderImpl appDeploymentBuilder = (ProcessApplicationDeploymentBuilderImpl) deploymentBuilder;
final ProcessApplicationReference appReference = appDeploymentBuilder.getProcessApplicationReference();
// build set of deployment ids this process app should be registered for:
Set<String> deploymentsToRegister = new HashSet<String>(Collections.singleton(deployment.getId()));
if (appDeploymentBuilder.isResumePreviousVersions()) {
if (ResumePreviousBy.RESUME_BY_PROCESS_DEFINITION_KEY.equals(appDeploymentBuilder.getResumePreviousVersionsBy())) {
deploymentsToRegister.addAll(resumePreviousByProcessDefinitionKey(commandContext, deployment, processKeysToRegisterFor));
} else if (ResumePreviousBy.RESUME_BY_DEPLOYMENT_NAME.equals(appDeploymentBuilder.getResumePreviousVersionsBy())) {
deploymentsToRegister.addAll(resumePreviousByDeploymentName(commandContext, deployment));
}
}
// register process application for deployments
return new RegisterProcessApplicationCmd(deploymentsToRegister, appReference).execute(commandContext);
}
Aggregations