public NotFoundException cannotFindResource(String resourcePath) { return new NotFoundException(exceptionMessage( "024", "Unable to find resource at path {}", resourcePath)); }
@Override public Response deleteHistoricVariableInstancesByProcessInstanceId(String processInstanceId) { try { processEngine.getHistoryService().deleteHistoricVariableInstancesByProcessInstanceId(processInstanceId); } catch (NotFoundException nfe) { // rewrite status code from bad request (400) to not found (404) throw new InvalidRequestException(Status.NOT_FOUND, nfe.getMessage()); } // return no content (204) since resource is deleted return Response.noContent().build(); } }
public NotFoundException cannotFindResource(String resourcePath) { return new NotFoundException(exceptionMessage( "024", "Unable to find resource at path {}", resourcePath)); }
@Override public Response deleteHistoricVariableInstancesByProcessInstanceId(String processInstanceId) { try { processEngine.getHistoryService().deleteHistoricVariableInstancesByProcessInstanceId(processInstanceId); } catch (NotFoundException nfe) { // rewrite status code from bad request (400) to not found (404) throw new InvalidRequestException(Status.NOT_FOUND, nfe.getMessage()); } // return no content (204) since resource is deleted return Response.noContent().build(); } }
public CmmnModelInstance getCmmnModelInstance(String caseDefinitionId) { try { return commandExecutor.execute(new GetDeploymentCmmnModelInstanceCmd(caseDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CmmnModelInstanceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (DeploymentResourceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
@Override public Response deleteProcessDefinition(boolean cascade, boolean skipCustomListeners, boolean skipIoMappings) { RepositoryService repositoryService = engine.getRepositoryService(); try { repositoryService.deleteProcessDefinition(processDefinitionId, cascade, skipCustomListeners, skipIoMappings); } catch (NotFoundException nfe) { throw new InvalidRequestException(Status.NOT_FOUND, nfe, nfe.getMessage()); } return Response.ok().build(); }
public InputStream getCaseModel(String caseDefinitionId) { try { return commandExecutor.execute(new GetDeploymentCaseModelCmd(caseDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseDefinitionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (DeploymentResourceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
@Override public Response deleteProcessDefinition(boolean cascade, boolean skipCustomListeners, boolean skipIoMappings) { RepositoryService repositoryService = engine.getRepositoryService(); try { repositoryService.deleteProcessDefinition(processDefinitionId, cascade, skipCustomListeners, skipIoMappings); } catch (NotFoundException nfe) { throw new InvalidRequestException(Status.NOT_FOUND, nfe, nfe.getMessage()); } return Response.ok().build(); }
public InputStream getCaseModel(String caseDefinitionId) { try { return commandExecutor.execute(new GetDeploymentCaseModelCmd(caseDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseDefinitionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (DeploymentResourceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
@Override public Response deleteVariableInstance() { try { getEngine().getHistoryService().deleteHistoricVariableInstance(id); } catch (NotFoundException nfe) { // rewrite status code from bad request (400) to not found (404) throw new InvalidRequestException(Status.NOT_FOUND, nfe, nfe.getMessage()); } // return no content (204) since resource is deleted return Response.noContent().build(); }
public CmmnModelInstance getCmmnModelInstance(String caseDefinitionId) { try { return commandExecutor.execute(new GetDeploymentCmmnModelInstanceCmd(caseDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CmmnModelInstanceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (DeploymentResourceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
@Override public Response deleteVariableInstance() { try { getEngine().getHistoryService().deleteHistoricVariableInstance(id); } catch (NotFoundException nfe) { // rewrite status code from bad request (400) to not found (404) throw new InvalidRequestException(Status.NOT_FOUND, nfe, nfe.getMessage()); } // return no content (204) since resource is deleted return Response.noContent().build(); }
public InputStream getDecisionModel(String decisionDefinitionId) { try { return commandExecutor.execute(new GetDeploymentDecisionModelCmd(decisionDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (DecisionDefinitionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (DeploymentResourceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
public void resolveIncident() { try { engine.getRuntimeService().resolveIncident(incidentId); } catch (NotFoundException e) { throw new InvalidRequestException(Status.NOT_FOUND, e.getMessage()); } catch (BadUserRequestException e) { throw new InvalidRequestException(Status.BAD_REQUEST, e.getMessage()); } } }
public DmnModelInstance getDmnModelInstance(String decisionDefinitionId) { try { return commandExecutor.execute(new GetDeploymentDmnModelInstanceCmd(decisionDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (DmnModelInstanceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (DeploymentResourceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
public void resolveIncident() { try { engine.getRuntimeService().resolveIncident(incidentId); } catch (NotFoundException e) { throw new InvalidRequestException(Status.NOT_FOUND, e.getMessage()); } catch (BadUserRequestException e) { throw new InvalidRequestException(Status.BAD_REQUEST, e.getMessage()); } } }
public InputStream getDecisionRequirementsModel(String decisionRequirementsDefinitionId) { try { return commandExecutor.execute(new GetDeploymentDecisionRequirementsModelCmd(decisionRequirementsDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (DecisionDefinitionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (DeploymentResourceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
protected void deleteProcessDefinitions(DeleteProcessDefinitionsBuilder builder, boolean cascade, boolean skipCustomListeners, boolean skipIoMappings) { if (skipCustomListeners) { builder = builder.skipCustomListeners(); } if (cascade) { builder = builder.cascade(); } if (skipIoMappings) { builder = builder.skipIoMappings(); } try { builder.delete(); } catch (NotFoundException e) { // rewrite status code from bad request (400) to not found (404) throw new InvalidRequestException(Status.NOT_FOUND, e.getMessage()); } }
public InputStream getDecisionModel(String decisionDefinitionId) { try { return commandExecutor.execute(new GetDeploymentDecisionModelCmd(decisionDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (DecisionDefinitionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } catch (DeploymentResourceNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
@Override public void setRetries(SetRetriesForExternalTasksDto retriesDto){ UpdateExternalTaskRetriesBuilder builder = updateRetries(retriesDto); int retries = retriesDto.getRetries(); try { builder.set(retries); } catch (NotFoundException e) { throw new InvalidRequestException(Status.NOT_FOUND, e.getMessage()); } catch (BadUserRequestException e) { throw new InvalidRequestException(Status.BAD_REQUEST, e.getMessage()); } }