Package org.camunda.bpm.engine.exception

Examples of org.camunda.bpm.engine.exception.NotValidException


  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);
    }
  }
View Full Code Here


    return (T) this;
  }

  protected void checkQueryOk() {
    if (orderProperty != null) {
      throw new NotValidException("Invalid query: call asc() or desc() after using orderByXX()");
    }
  }
View Full Code Here

  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) {
View Full Code Here

  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);

    }
View Full Code Here

  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) {
View Full Code Here

    ensureNotNull(NotValidException.class, "name", name);
    if(value == null || isBoolean(value)) {
      // Null-values and booleans can only be used in EQUALS and NOT_EQUALS
      switch(operator) {
      case GREATER_THAN:
        throw new NotValidException("Booleans and null cannot be used in 'greater than' condition");
      case LESS_THAN:
        throw new NotValidException("Booleans and null cannot be used in 'less than' condition");
      case GREATER_THAN_OR_EQUAL:
        throw new NotValidException("Booleans and null cannot be used in 'greater than or equal' condition");
      case LESS_THAN_OR_EQUAL:
        throw new NotValidException("Booleans and null cannot be used in 'less than or equal' condition");
      case LIKE:
        throw new NotValidException("Booleans and null cannot be used in 'like' condition");
      }
    }
    queryVariableValues.add(new QueryVariableValue(name, value, operator, processInstanceScope));
  }
View Full Code Here

      }
      else if (Direction.DESCENDING.getName().equals(sortOrder)) {
        query.desc();
      }
      else {
        throw new NotValidException("Unknown sort ordering '" + sortOrder + "' in query");
      }
    }

    // expressions
    Iterator jsonIterator = json.keys();
View Full Code Here

    }
    else if (FOLLOW_UP_DATE.equals(sortBy)) {
      query.orderByFollowUpDate();
    }
    else {
      throw new NotValidException("Unknown sort by '" + sortBy + "' in query");
    }
  }
View Full Code Here

      .owner(EXAMPLE_FILTER_OWNER)
      .query(EXAMPLE_FILTER_QUERY)
      .properties(EXAMPLE_FILTER_PROPERTIES)
      .build();

    doThrow(new NotValidException("Name must not be null"))
      .when(mock).setName(null);
    doThrow(new NotValidException("Name must not be empty"))
      .when(mock).setName("");
    doThrow(new NotValidException("Query must not be null"))
      .when(mock).setQuery(null);

    return mock;
  }
View Full Code Here

    verify(caseExecutionCommandBuilderMock).manualStart();
  }

  @Test
  public void testUnsuccessfulManualStart() {
    doThrow(new NotValidException("expected exception")).when(caseExecutionCommandBuilderMock).manualStart();

    given()
      .pathParam("id", MockProvider.EXAMPLE_CASE_EXECUTION_ID)
      .contentType(ContentType.JSON)
      .body(EMPTY_JSON_OBJECT)
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.exception.NotValidException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.