Package org.activiti.engine

Examples of org.activiti.engine.ActivitiObjectNotFoundException


    TaskEntity task = commandContext
      .getTaskEntityManager()
      .findTaskById(taskId);
   
    if (task==null) {
      throw new ActivitiObjectNotFoundException("task "+taskId+" doesn't exist", Task.class);
    }

    Map<String, Object> taskVariables;
    if (isLocal) {
      taskVariables = task.getVariablesLocal();
View Full Code Here


 
  @Override
  public void setUserPicture(String userId, Picture picture) {
    UserEntity user = (UserEntity) findUserById(userId);
    if(user == null) {
      throw new ActivitiObjectNotFoundException("user "+userId+" doesn't exist", User.class);
    }
     
    user.setPicture(picture);
  }
View Full Code Here

    TaskEntity task = commandContext
      .getTaskEntityManager()
      .findTaskById(taskId);
   
    if (task==null) {
      throw new ActivitiObjectNotFoundException("task "+taskId+" doesn't exist", Task.class);
    }
    boolean hasVariable = false;
   
    if (isLocal) {
      hasVariable = task.hasVariableLocal(variableName);
View Full Code Here

    ProcessDefinitionEntity processDefinition = commandContext
        .getProcessDefinitionEntityManager()
        .findProcessDefinitionById(processDefinitionId);
     
    if (processDefinition == null) {
      throw new ActivitiObjectNotFoundException("Cannot find process definition with id " + processDefinitionId, ProcessDefinition.class);
    }
   
    List<IdentityLink> identityLinks = (List) processDefinition.getIdentityLinks();
    return identityLinks;
  }
View Full Code Here

    ExecutionEntity execution = commandContext
      .getExecutionEntityManager()
      .findExecutionById(executionId);
   
    if (execution==null) {
      throw new ActivitiObjectNotFoundException("execution "+executionId+" doesn't exist", Execution.class);
    }
   
    boolean hasVariable = false;
   
    if (isLocal) {
View Full Code Here

    }
    User user = commandContext
      .getUserIdentityManager()
      .findUserById(userId);
    if(user == null) {
      throw new ActivitiObjectNotFoundException("user "+userId+" doesn't exist", User.class);
    }
    return commandContext.getUserIdentityManager().getUserPicture(userId);
  }
View Full Code Here

    ProcessDefinitionEntity processDefinitionEntity = commandContext
            .getProcessDefinitionEntityManager()
            .findProcessDefinitionById(processDefinitionId);
   
    if (processDefinitionEntity == null) {
      throw new ActivitiObjectNotFoundException("Process definition does not exist: " + processDefinitionId, ProcessDefinitionEntity.class);
    }

    // Fetch the resource
    String resourceName = processDefinitionEntity.getResourceName();
    ResourceEntity resource = commandContext.getResourceEntityManager()
            .findResourceByDeploymentIdAndResourceName(processDefinitionEntity.getDeploymentId(), resourceName);
    if (resource == null) {
      if (commandContext.getDeploymentEntityManager().findDeploymentById(processDefinitionEntity.getDeploymentId()) == null) {
        throw new ActivitiObjectNotFoundException("deployment for process definition does not exist: "
      + processDefinitionEntity.getDeploymentId(), Deployment.class);
      } else {
        throw new ActivitiObjectNotFoundException("no resource found with name '" + resourceName
                + "' in deployment '" + processDefinitionEntity.getDeploymentId() + "'", InputStream.class);
      }
    }
   
    // Convert the bpmn 2.0 xml to a bpmn model
View Full Code Here

    ProcessDefinitionEntity processDefinition = commandContext
      .getProcessEngineConfiguration()
      .getDeploymentManager()
      .findDeployedProcessDefinitionById(processDefinitionId);
    if (processDefinition == null) {
      throw new ActivitiObjectNotFoundException("No process definition found for id '" + processDefinitionId +"'", ProcessDefinition.class);
    }
   
    StartFormHandler startFormHandler = processDefinition.getStartFormHandler();
    if (startFormHandler == null) {
      throw new ActivitiException("No startFormHandler defined in process '" + processDefinitionId +"'");
View Full Code Here

  public void deleteProcessInstance(String processInstanceId, String deleteReason, boolean cascade) {
    ExecutionEntity execution = findExecutionById(processInstanceId);
   
    if(execution == null) {
      throw new ActivitiObjectNotFoundException("No process instance found for id '" + processInstanceId + "'", ProcessInstance.class);
    }
   
    CommandContext commandContext = Context.getCommandContext();
    commandContext
      .getTaskEntityManager()
View Full Code Here

    TaskEntity task = commandContext
      .getTaskEntityManager()
      .findTaskById(taskId);
   
    if (task == null) {
      throw new ActivitiObjectNotFoundException("Cannot find task with id " + taskId, Task.class);
    }
   
    if (task.isSuspended()) {
      throw new ActivitiException(getSuspendedTaskException());
    }
View Full Code Here

TOP

Related Classes of org.activiti.engine.ActivitiObjectNotFoundException

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.