deploymentMap.putAll(findResources(processApplicationClassloader, paResourceRoot, additionalResourceSuffixes));
}
// perform process engine deployment
RepositoryService repositoryService = processEngine.getRepositoryService();
ProcessApplicationDeploymentBuilder deploymentBuilder = repositoryService.createDeployment(processApplication.getReference());
// set the name for the deployment
String deploymentName = processArchive.getName();
if(deploymentName == null || deploymentName.isEmpty()) {
deploymentName = processApplication.getName();
}
deploymentBuilder.name(deploymentName);
// enable duplicate filtering
deploymentBuilder.enableDuplicateFiltering(PropertyHelper.getBooleanProperty(processArchive.getProperties(), ProcessArchiveXml.PROP_IS_DEPLOY_CHANGED_ONLY, false));
// enable resuming of previous versions:
if(PropertyHelper.getBooleanProperty(processArchive.getProperties(), ProcessArchiveXml.PROP_IS_RESUME_PREVIOUS_VERSIONS, true)) {
deploymentBuilder.resumePreviousVersions();
}
// add all resources obtained through the processes.xml and through scanning
for (Entry<String, byte[]> deploymentResource : deploymentMap.entrySet()) {
deploymentBuilder.addInputStream(deploymentResource.getKey(), new ByteArrayInputStream(deploymentResource.getValue()));
}
// allow the process application to add additional resources to the deployment
processApplication.createDeployment(processArchive.getName(), deploymentBuilder);
Collection<String> deploymentResourceNames = deploymentBuilder.getResourceNames();
if(!deploymentResourceNames.isEmpty()) {
logDeploymentSummary(deploymentResourceNames, deploymentName);
// perform the process engine deployment
deployment = deploymentBuilder.deploy();
// add attachment
Map<String, DeployedProcessArchive> processArchiveDeploymentMap = operationContext.getAttachment(Attachments.PROCESS_ARCHIVE_DEPLOYMENT_MAP);
if(processArchiveDeploymentMap == null) {
processArchiveDeploymentMap = new HashMap<String, DeployedProcessArchive>();