Package org.camunda.bpm.engine

Examples of org.camunda.bpm.engine.BadUserRequestException


  public void deleteProcessInstance(String processInstanceId, String deleteReason, boolean cascade, boolean skipCustomListeners) {
    ExecutionEntity execution = findExecutionById(processInstanceId);

    if(execution == null) {
      throw new BadUserRequestException("No process instance found for id '" + processInstanceId + "'");
    }

    CommandContext commandContext = Context.getCommandContext();
    commandContext
      .getTaskManager()
View Full Code Here


    }
  }

  public String getFormKey() {
    if(!isFormKeyInitialized) {
      throw new BadUserRequestException("The form key is not initialized. You must call initializeFormKeys() on the task query prior to retrieving the form key.");
    }
    return formKey;
  }
View Full Code Here

  public void deleteCaseInstance(String caseInstanceId, String deleteReason, boolean cascade) {
    CaseExecutionEntity execution = findCaseExecutionById(caseInstanceId);

    if(execution == null) {
      throw new BadUserRequestException("No case instance found for id '" + caseInstanceId + "'");
    }

    CommandContext commandContext = Context.getCommandContext();
    commandContext
      .getTaskManager()
View Full Code Here

    TaskEntity task = commandContext.getTaskManager()
      .findTaskById(resourceId);

    if(task == null) {
      throw new BadUserRequestException("Cannot find task with id '"+resourceId+"'.");
    }

    VariableMapImpl result = new VariableMapImpl();

    // first, evaluate form fields
View Full Code Here

  }

  @Override
  public Object execute(CommandContext commandContext) {
    if(executionId == null) {
      throw new BadUserRequestException("executionId is null");
    }
   
    ExecutionEntity execution = commandContext
      .getExecutionManager()
      .findExecutionById(executionId);
   
    if (execution==null) {
      throw new BadUserRequestException("execution "+executionId+" doesn't exist");
    }
   
    if(processVariables != null) {
      execution.setVariables(processVariables);
    }
View Full Code Here

    this.skipCustomListeners = skipCustomListeners;
  }

  public Void execute(CommandContext commandContext) {
    if(processInstanceId == null) {
      throw new BadUserRequestException("processInstanceId is null");
    }

    commandContext
      .getExecutionManager()
      .deleteProcessInstance(processInstanceId, deleteReason, false, skipCustomListeners);
View Full Code Here

    String variableKey = "aVariableKey";
    String variableValue = "aVariableValue";

    Map<String, Object> variableJson = VariablesBuilder.getVariableValueMap(variableValue);

    doThrow(new BadUserRequestException("expected exception"))
      .when(runtimeServiceMock).setVariableLocal(eq(MockProvider.EXAMPLE_EXECUTION_ID), eq(variableKey), any());

    given().pathParam("id", MockProvider.EXAMPLE_EXECUTION_ID).pathParam("varId", variableKey)
      .contentType(ContentType.JSON).body(variableJson)
      .then().expect().statusCode(Status.BAD_REQUEST.getStatusCode())
View Full Code Here

    TaskEntity task = commandContext.getTaskManager()
      .findTaskById(resourceId);

    if(task == null) {
      throw new BadUserRequestException("Cannot find task with id '"+resourceId+"'.");
    }

    Map<String, PersistentVariableInstance> result = new HashMap<String, PersistentVariableInstance>();

    // first, evaluate form fields
View Full Code Here

  public void deleteCaseInstance(String caseInstanceId, String deleteReason, boolean cascade) {
    CaseExecutionEntity execution = findCaseExecutionById(caseInstanceId);

    if(execution == null) {
      throw new BadUserRequestException("No case instance found for id '" + caseInstanceId + "'");
    }

    CommandContext commandContext = Context.getCommandContext();
    commandContext
      .getTaskManager()
View Full Code Here

    }
  }

  public String getFormKey() {
    if(!isFormKeyInitialized) {
      throw new BadUserRequestException("The form key is not initialized. You must call initializeFormKeys() on the task query prior to retrieving the form key.");
    }
    return formKey;
  }
View Full Code Here

TOP

Related Classes of org.camunda.bpm.engine.BadUserRequestException

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.