Package org.activiti.engine

Examples of org.activiti.engine.ActivitiException


      deployment.setNew(false);
      deploy(deployment);
      processDefinition = processDefinitionCache.get(processDefinitionId);
     
      if (processDefinition==null) {
        throw new ActivitiException("deployment '"+deploymentId+"' didn't put process definition '"+processDefinitionId+"' in the cache");
      }
    }
    return processDefinition;
  }
View Full Code Here


  }
 
  public T execute(CommandContext commandContext) {
   
    if(taskId == null) {
      throw new ActivitiException("taskId is null");
    }
   
    TaskEntity task = Context
      .getCommandContext()
      .getTaskManager()
      .findTaskById(taskId);
   
    if (task == null) {
      throw new ActivitiException("Cannot find task with id " + taskId);
    }
   
    if (task.isSuspended()) {
      throw new ActivitiException(getSuspendedTaskException());
    }
   
    return execute(commandContext, task);
  }
View Full Code Here

    return Collections.EMPTY_LIST;
  }
 
  public HistoricTaskInstanceEntity findHistoricTaskInstanceById(String taskId) {
    if (taskId == null) {
      throw new ActivitiException("Invalid historic task id : null");
    }
    if (getHistoryManager().isHistoryEnabled()) {
      return (HistoricTaskInstanceEntity) getDbSqlSession().selectOne("selectHistoricTaskInstance", taskId);
    }
    return null;
View Full Code Here

    this.tableName = tableName;
  }
 
  public TableMetaData execute(CommandContext commandContext) {
    if(tableName == null) {
      throw new ActivitiException("tableName is null");
    }
    return commandContext
      .getTableDataManager()
      .getTableMetaData(tableName);
  }
View Full Code Here

  private static final long serialVersionUID = 1L;
  protected String processDefinitionId;

  public GetDeploymentProcessModelCmd(String processDefinitionId) {
    if (processDefinitionId == null || processDefinitionId.length() < 1) {
      throw new ActivitiException("The process definition id is mandatory, but '" + processDefinitionId + "' has been provided.");
    }
    this.processDefinitionId = processDefinitionId;
  }
View Full Code Here

 
  public T create() {
    try {
      return clazz.newInstance();
    } catch (Exception e) {
      throw new ActivitiException("Couldn't instantiate class " + clazz, e);
    }
  }
View Full Code Here

    this.jobId = jobId;
  }

  public Object execute(CommandContext commandContext) {
    if (jobId == null) {
      throw new ActivitiException("jobId is null");
    }
    if (log.isLoggable(Level.FINE)) {
      log.fine("Deleting job " + jobId);
    }

    JobEntity job = commandContext.getJobManager().findJobById(jobId);
    if (job == null) {
      throw new ActivitiException("No job found with id '" + jobId + "'");
    }
   
    // We need to check if the job was locked, ie acquired by the job acquisition thread
    // This happens if the the job was already acquired, but not yet executed.
    // In that case, we can't allow to delete the job.
    if (job.getLockOwner() != null || job.getLockExpirationTime() != null)
    {
      throw new ActivitiException("Cannot delete job when the job is being executed. Try again later.");
    }

    job.delete();
    return null;
  }
View Full Code Here

    this.userId = userId;
  }

  public Void execute(CommandContext commandContext) {
    if(userId == null) {
      throw new ActivitiException("userId is null");
    }
    commandContext
      .getUserManager()
      .deleteUser(userId);
   
View Full Code Here

 
  protected String processDefinitionId;

  public GetDeploymentProcessDiagramCmd(String processDefinitionId) {
    if (processDefinitionId == null || processDefinitionId.length() < 1) {
      throw new ActivitiException("The process definition id is mandatory, but '" + processDefinitionId + "' has been provided.");
    }
    this.processDefinitionId = processDefinitionId;
  }
View Full Code Here

    this.modelId = modelId;
  }

  public byte[] execute(CommandContext commandContext) {
    if (modelId == null) {
      throw new ActivitiException("modelId is null");
    }
   
    byte[] bytes = commandContext
      .getModelManager()
      .findEditorSourceByModelId(modelId);
View Full Code Here

TOP

Related Classes of org.activiti.engine.ActivitiException

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.