Package org.camunda.bpm.engine.exception

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


    verify(caseExecutionCommandBuilderMock).complete();
  }

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

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


    verify(caseExecutionCommandBuilderMock).close();
  }

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

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

  }

  protected void ensureVariableShouldNotBeRemoved(String variableName) {
    if ((variableDeletions != null && variableDeletions.contains(variableName))
        || (variableLocalDeletions != null && variableLocalDeletions.contains(variableName))) {
      throw new NotValidException("Cannot set and remove a variable with the same variable name: '"+variableName+"' within a command.");
    }
  }
View Full Code Here

  }

  protected void ensureVariableShouldNotBeSet(String variableName) {
    if ((variables != null && variables.keySet().contains(variableName))
        || (variablesLocal != null && variablesLocal.keySet().contains(variableName))) {
      throw new NotValidException("Cannot set and remove a variable with the same variable name: '"+variableName+"' within a command.");
    }
  }
View Full Code Here

      } else {
        command.execute(commandContext);
      }

    } catch (NullValueException e) {
      throw new NotValidException(e.getMessage(), e);

    } catch (CaseExecutionNotFoundException e) {
      throw new NotFoundException(e.getMessage(), e);
    } catch (CaseDefinitionNotFoundException e) {
      throw new NotFoundException(e.getMessage(), e);
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

  @SuppressWarnings("unchecked")
  public <T extends Query<?, ?>> Filter extend(T extendingQuery) {
    ensureNotNull(NotValidException.class, "extendingQuery", extendingQuery);

    if (!extendingQuery.getClass().equals(query.getClass())) {
      throw new NotValidException("Unable to extend a query of class '" + query.getClass() + "' by a query of class '" + extendingQuery.getClass() + "'");
    }

    FilterEntity copy = copyFilter();
    copy.setQuery(query.extend(extendingQuery));
View Full Code Here

    } catch (CaseDefinitionNotFoundException e) {
      throw new NotFoundException(e.getMessage(), e);

    } catch (NullValueException e) {
      throw new NotValidException(e.getMessage(), e);

    } catch (CaseIllegalStateTransitionException e) {
      throw new NotAllowedException(e.getMessage(), e);

    }
View Full Code Here

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

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