resourceName = resource.getFilename();
}
}
try {
DeploymentBuilder deploymentBuilder = repositoryService
.createDeployment().enableDuplicateFiltering()
.name(resourceName);
if (resourceName.endsWith(".bar")
|| resourceName.endsWith(".zip")
|| resourceName.endsWith(".jar")) {
deploymentBuilder.addZipInputStream(new ZipInputStream(
resource.getInputStream()));
} else {
deploymentBuilder.addInputStream(resourceName,
resource.getInputStream());
}
Deployment deployment = deploymentBuilder.deploy();
logger.info("auto deploy : {}", resourceName);
for (ProcessDefinition processDefinition : repositoryService
.createProcessDefinitionQuery()
.deploymentId(deployment.getId()).list()) {