@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 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); } }
public void deleteJob() { try { engine.getManagementService() .deleteJob(jobId); } catch (AuthorizationException e) { throw e; } catch (NullValueException e) { throw new InvalidRequestException(Status.NOT_FOUND, e.getMessage()); } catch (ProcessEngineException e) { throw new RestException(Status.INTERNAL_SERVER_ERROR, e.getMessage()); } }
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 void testSetRetriesNullTaskId() { try { externalTaskService.setRetries((String)null, 5); fail("expected exception"); } catch (NullValueException e) { Assert.assertThat(e.getMessage(), containsString("externalTaskId is null")); } }
public void testSetPriorityNullTaskId() { try { externalTaskService.setPriority(null, 5); fail("expected exception"); } catch (NullValueException e) { Assert.assertThat(e.getMessage(), containsString("externalTaskId is null")); } }
public void testNullAuthorizationCheckUserGroup() { try { authorizationService.isUserAuthorized(null, null, UPDATE, TestResource.RESOURCE1); fail("Expected NullValueException"); } catch (NullValueException e) { assertTrue(e.getMessage().contains("Authorization must have a 'userId' or/and a 'groupId'")); } }
public void testNullAuthorizationCheckResource() { try { authorizationService.isUserAuthorized("jonny", null, UPDATE, null); fail("Expected NullValueException"); } catch (NullValueException e) { assertTrue(e.getMessage().contains("Invalid resource for an authorization")); } }
public void testCompositeHistoryEventHandlerArgumentConstructorWithNullVarargs() { HistoryEventHandler historyEventHandler = null; try { new CompositeHistoryEventHandler(historyEventHandler); fail("NullValueException expected"); } catch (NullValueException e) { assertTextPresent("History event handler is null", 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 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); } }
public void testSetJobPriorityForNullJob() { try { managementService.setJobPriority(null, 42); fail("should not succeed"); } catch (NullValueException e) { assertTextPresentIgnoreCase("Job id must not be null", e.getMessage()); } }
@Test public void testQueryByNullJobDefinitionId() { try { runtimeService.createIncidentQuery() .jobDefinitionIdIn((String) null); fail("Should fail"); } catch (NullValueException e) { assertThat(e.getMessage(), CoreMatchers.containsString("jobDefinitionIds contains null value")); } }
@Test public void testQueryByNullJobDefinitionIds() { try { runtimeService.createIncidentQuery() .jobDefinitionIdIn((String[]) null); fail("Should fail"); } catch (NullValueException e) { assertThat(e.getMessage(), CoreMatchers.containsString("jobDefinitionIds is null")); } }
public void testCompositeHistoryEventHandlerNonArgumentConstructorAddNullEvent() { CompositeHistoryEventHandler compositeHistoryEventHandler = new CompositeHistoryEventHandler(); try { compositeHistoryEventHandler.add(null); fail("NullValueException expected"); } catch (NullValueException e) { assertTextPresent("History event handler is null", e.getMessage()); } }
@Test public void testBatchQueryByIdNull() { try { managementService.createBatchQuery().batchId(null).singleResult(); Assert.fail("exception expected"); } catch (NullValueException e) { Assert.assertThat(e.getMessage(), CoreMatchers.containsString("Batch id is null")); } }
@Test public void testBatchQueryByIdNull() { try { historyService.createHistoricBatchQuery().batchId(null).singleResult(); Assert.fail("exception expected"); } catch (NullValueException e) { Assert.assertThat(e.getMessage(), CoreMatchers.containsString("Batch id is null")); } }
@Test public void testBatchQueryByTypeNull() { try { historyService.createHistoricBatchQuery().type(null).singleResult(); Assert.fail("exception expected"); } catch (NullValueException e) { Assert.assertThat(e.getMessage(), CoreMatchers.containsString("Type is null")); } }