public void deployOnlyGivenResourcesOfDeployment(final DeploymentEntity deployment, String... resourceNames) { initDeployment(deployment, resourceNames); Context.getCommandContext().runWithoutAuthorization(new Callable<Void>() { public Void call() throws Exception { for (Deployer deployer : deployers) { deployer.deploy(deployment); } return null; } }); deployment.setResources(null); }
public void deployOnlyGivenResourcesOfDeployment(final DeploymentEntity deployment, String... resourceNames) { initDeployment(deployment, resourceNames); Context.getCommandContext().runWithoutAuthorization(new Callable<Void>() { public Void call() throws Exception { for (Deployer deployer : deployers) { deployer.deploy(deployment); } return null; } }); deployment.setResources(null); }
@Override public DeploymentWithDefinitions call() throws Exception { acquireExclusiveLock(commandContext); DeploymentEntity deployment = initDeployment(); Map<String, ResourceEntity> resourcesToDeploy = resolveResourcesToDeploy(commandContext, deployment); Map<String, ResourceEntity> resourcesToIgnore = new HashMap<String, ResourceEntity>(deployment.getResources()); resourcesToIgnore.keySet().removeAll(resourcesToDeploy.keySet()); if (!resourcesToDeploy.isEmpty()) { LOG.debugCreatingNewDeployment(); deployment.setResources(resourcesToDeploy); deploy(deployment); } else { LOG.usingExistingDeployment(); deployment = getExistingDeployment(commandContext, deployment.getName()); } scheduleProcessDefinitionActivation(commandContext, deployment); if(deploymentBuilder instanceof ProcessApplicationDeploymentBuilder) { // for process application deployments, job executor registration is managed by // process application manager Set<String> processesToRegisterFor = retrieveProcessKeysFromResources(resourcesToIgnore); ProcessApplicationRegistration registration = registerProcessApplication(commandContext, deployment, processesToRegisterFor); return new ProcessApplicationDeploymentImpl(deployment, registration); } else { registerWithJobExecutor(commandContext, deployment); } return deployment; } });
@Override public DeploymentWithDefinitions call() throws Exception { acquireExclusiveLock(commandContext); DeploymentEntity deployment = initDeployment(); Map<String, ResourceEntity> resourcesToDeploy = resolveResourcesToDeploy(commandContext, deployment); Map<String, ResourceEntity> resourcesToIgnore = new HashMap<String, ResourceEntity>(deployment.getResources()); resourcesToIgnore.keySet().removeAll(resourcesToDeploy.keySet()); if (!resourcesToDeploy.isEmpty()) { LOG.debugCreatingNewDeployment(); deployment.setResources(resourcesToDeploy); deploy(deployment); } else { LOG.usingExistingDeployment(); deployment = getExistingDeployment(commandContext, deployment.getName()); } scheduleProcessDefinitionActivation(commandContext, deployment); if(deploymentBuilder instanceof ProcessApplicationDeploymentBuilder) { // for process application deployments, job executor registration is managed by // process application manager Set<String> processesToRegisterFor = retrieveProcessKeysFromResources(resourcesToIgnore); ProcessApplicationRegistration registration = registerProcessApplication(commandContext, deployment, processesToRegisterFor); return new ProcessApplicationDeploymentImpl(deployment, registration); } else { registerWithJobExecutor(commandContext, deployment); } return deployment; } });
public void deployOnlyGivenResourcesOfDeployment(final DeploymentEntity deployment, String... resourceNames) { initDeployment(deployment, resourceNames); Context.getCommandContext().runWithoutAuthorization(new Callable<Void>() { public Void call() throws Exception { for (Deployer deployer : deployers) { deployer.deploy(deployment); } return null; } }); deployment.setResources(null); }
@Override public DeploymentWithDefinitions call() throws Exception { acquireExclusiveLock(commandContext); DeploymentEntity deployment = initDeployment(); Map<String, ResourceEntity> resourcesToDeploy = resolveResourcesToDeploy(commandContext, deployment); Map<String, ResourceEntity> resourcesToIgnore = new HashMap<String, ResourceEntity>(deployment.getResources()); resourcesToIgnore.keySet().removeAll(resourcesToDeploy.keySet()); if (!resourcesToDeploy.isEmpty()) { LOG.debugCreatingNewDeployment(); deployment.setResources(resourcesToDeploy); deploy(deployment); } else { LOG.usingExistingDeployment(); deployment = getExistingDeployment(commandContext, deployment.getName()); } scheduleProcessDefinitionActivation(commandContext, deployment); if(deploymentBuilder instanceof ProcessApplicationDeploymentBuilder) { // for process application deployments, job executor registration is managed by // process application manager Set<String> processesToRegisterFor = retrieveProcessKeysFromResources(resourcesToIgnore); ProcessApplicationRegistration registration = registerProcessApplication(commandContext, deployment, processesToRegisterFor); return new ProcessApplicationDeploymentImpl(deployment, registration); } else { registerWithJobExecutor(commandContext, deployment); } return deployment; } });