Package org.camunda.bpm.engine.exception

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


    verify(caseExecutionCommandBuilderMock).disable();
  }

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

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


    verify(caseExecutionCommandBuilderMock).reenable();
  }

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

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

    verify(caseExecutionCommandBuilderMock).complete();
  }

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

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

  public void checkQueryOk() {
    super.checkQueryOk();

    // latest() makes only sense when used with key() or keyLike()
    if (latest && ( (id != null) || (name != null) || (nameLike != null) || (version != null) || (deploymentId != null) ) ){
      throw new NotValidException("Calling latest() can only be used in combination with key(String) and keyLike(String)");
    }
  }
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

    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

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.