protected internal virtual DeploymentWithDefinitions tryToRedeploy(RedeploymentDto redeployment) { RepositoryService repositoryService = ProcessEngine.RepositoryService; DeploymentBuilder builder = repositoryService.createDeployment(); builder.nameFromDeployment(deploymentId); string tenantId = Deployment.TenantId; if (!string.ReferenceEquals(tenantId, null)) { builder.tenantId(tenantId); } if (redeployment != null) { builder = addRedeploymentResources(builder, redeployment); } else { builder.addDeploymentResources(deploymentId); } return(builder.deployWithResult()); }
public virtual DeploymentWithDefinitions deploy(DeploymentBuilder deploymentBuilder) { DeploymentWithDefinitions deployment = deploymentBuilder.deployWithResult(); processEngineRule.manageDeployment(deployment); return(deployment); }
public virtual DeploymentWithDefinitionsDto createDeployment(UriInfo uriInfo, MultipartFormData payload) { DeploymentBuilder deploymentBuilder = extractDeploymentInformation(payload); if (deploymentBuilder.ResourceNames.Count > 0) { DeploymentWithDefinitions deployment = deploymentBuilder.deployWithResult(); DeploymentWithDefinitionsDto deploymentDto = DeploymentWithDefinitionsDto.fromDeployment(deployment); URI uri = uriInfo.BaseUriBuilder.path(relativeRootResourcePath).path(org.camunda.bpm.engine.rest.DeploymentRestService_Fields.PATH).path(deployment.Id).build(); // GET deploymentDto.addReflexiveLink(uri, HttpMethod.GET, "self"); return(deploymentDto); } else { throw new InvalidRequestException(Status.BAD_REQUEST, "No deployment resources contained in the form upload."); } }