public NotFoundException cannotFindResource(String resourcePath) { return new NotFoundException(exceptionMessage( "024", "Unable to find resource at path {}", resourcePath)); }
public NotFoundException cannotFindResource(String resourcePath) { return new NotFoundException(exceptionMessage( "024", "Unable to find resource at path {}", resourcePath)); }
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); } }
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); } }
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); } }
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); } }
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 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 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); } }
@SuppressWarnings("unchecked") protected <T extends TypedValue> T getCaseExecutionVariableTyped(String caseExecutionId, String variableName, boolean isLocal, boolean deserializeValue) { try { return (T) commandExecutor.execute(new GetCaseExecutionVariableTypedCmd(caseExecutionId, variableName, isLocal, deserializeValue)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseExecutionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
protected Object getCaseExecutionVariable(String caseExecutionId, String variableName, boolean isLocal) { try { return commandExecutor.execute(new GetCaseExecutionVariableCmd(caseExecutionId, variableName, isLocal)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseExecutionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
public DecisionRequirementsDefinition getDecisionRequirementsDefinition(String decisionRequirementsDefinitionId) { try { return commandExecutor.execute(new GetDeploymentDecisionRequirementsDefinitionCmd(decisionRequirementsDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (DecisionDefinitionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
public CaseDefinition getCaseDefinition(String caseDefinitionId) { try { return commandExecutor.execute(new GetDeploymentCaseDefinitionCmd(caseDefinitionId)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseDefinitionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
protected VariableMap getCaseExecutionVariables(String caseExecutionId, Collection<String> variableNames, boolean isLocal, boolean deserializeValues) { try { return commandExecutor.execute(new GetCaseExecutionVariablesCmd(caseExecutionId, variableNames, isLocal, deserializeValues)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseExecutionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
protected VariableMap getCaseExecutionVariables(String caseExecutionId, Collection<String> variableNames, boolean isLocal, boolean deserializeValues) { try { return commandExecutor.execute(new GetCaseExecutionVariablesCmd(caseExecutionId, variableNames, isLocal, deserializeValues)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseExecutionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
protected Object getCaseExecutionVariable(String caseExecutionId, String variableName, boolean isLocal) { try { return commandExecutor.execute(new GetCaseExecutionVariableCmd(caseExecutionId, variableName, isLocal)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseExecutionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
@SuppressWarnings("unchecked") protected <T extends TypedValue> T getCaseExecutionVariableTyped(String caseExecutionId, String variableName, boolean isLocal, boolean deserializeValue) { try { return (T) commandExecutor.execute(new GetCaseExecutionVariableTypedCmd(caseExecutionId, variableName, isLocal, deserializeValue)); } catch (NullValueException e) { throw new NotValidException(e.getMessage(), e); } catch (CaseExecutionNotFoundException e) { throw new NotFoundException(e.getMessage(), e); } }
@Test public void testResolveUnexistingIncident() { doThrow(new NotFoundException()).when(mockRuntimeService).resolveIncident(anyString()); given() .pathParam("id", MockProvider.EXAMPLE_INCIDENT_ID) .then().expect() .statusCode(Status.NOT_FOUND.getStatusCode()) .when() .delete(SINGLE_INCIDENT_URL); verify(mockRuntimeService).resolveIncident(MockProvider.EXAMPLE_INCIDENT_ID); } }
@Test public void testDeleteAllVariablesForNonExistingProcessInstance() { doThrow(new NotFoundException("No historic process instance found with id: 'NON_EXISTING_ID'")) .when(historyServiceMock).deleteHistoricVariableInstancesByProcessInstanceId("NON_EXISTING_ID"); given() .pathParam("id", "NON_EXISTING_ID") .expect() .statusCode(Status.NOT_FOUND.getStatusCode()) .body(containsString("No historic process instance found with id: 'NON_EXISTING_ID'")) .when() .delete(HISTORIC_SINGLE_PROCESS_INSTANCE_VARIABLES_URL); }
@Test public void testGetDeployedTaskFormWithUnexistingForm() { String message = "not found"; when(formServiceMock.getDeployedTaskForm(anyString())) .thenThrow(new NotFoundException(message)); given() .pathParam("id", MockProvider.EXAMPLE_TASK_ID) .then().expect() .statusCode(Status.NOT_FOUND.getStatusCode()) .body("message",equalTo(message)) .when() .get(DEPLOYED_TASK_FORM_URL); }