Package org.apache.oodt.cas.workflow.structs.exceptions

Examples of org.apache.oodt.cas.workflow.structs.exceptions.RepositoryException


      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getWorkflowTaskById transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
View Full Code Here


      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getWorkflowConditionById transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
View Full Code Here

      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getRegisteredEvents transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
View Full Code Here

    List<WorkflowCondition> allConditions = getConditions();
    // check its conditions
    if(task.getPreConditions() != null && task.getPreConditions().size() > 0){
      for(WorkflowCondition cond: task.getPreConditions()){
        if(!this.hasConditionId(allConditions, cond.getConditionId())){
          throw new RepositoryException("Reference in new task: ["+task.getTaskName()+"] to undefined pre condition ith id: ["+cond.getConditionId()+"]");           
        }         
      }
     
      for(WorkflowCondition cond: task.getPostConditions()){
        if(!this.hasConditionId(allConditions, cond.getConditionId())){
          throw new RepositoryException("Reference in new task: ["+task.getTaskName()+"] to undefined post condition ith id: ["+cond.getConditionId()+"]");           
        }             
      }
    }
   
    String taskId = this.commitTask(null, task);
View Full Code Here

  @Override
  public String addWorkflow(Workflow workflow) throws RepositoryException {
    // first check to see that its tasks are all present
    if (workflow.getTasks() == null
        || (workflow.getTasks() != null && workflow.getTasks().size() == 0)) {
      throw new RepositoryException("Attempt to define a new worklfow: ["
          + workflow.getName() + "] with no tasks.");
    }

    List<WorkflowTask> allTasks = this.getTasks();

    for (WorkflowTask task : (List<WorkflowTask>) workflow.getTasks()) {
      if (!this.hasTaskId(allTasks, task.getTaskId())) {
        throw new RepositoryException("Reference in new workflow: ["
            + workflow.getName() + "] to undefined task with id: ["
            + task.getTaskId() + "]");
      }

      // check its conditions
      if (task.getConditions() != null && task.getConditions().size() > 0) {
        List<WorkflowCondition> conditions = this.getConditionsByTaskId(task
            .getTaskId());
        for (WorkflowCondition cond : (List<WorkflowCondition>) task
            .getConditions()) {
          if (!this.hasConditionId(conditions, cond.getConditionId())) {
            throw new RepositoryException("Reference in new workflow: ["
                + workflow.getName() + "] to undefined condition ith id: ["
                + cond.getConditionId() + "]");
          }
        }
      }
View Full Code Here

      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getConditionsByWorkflowId transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
View Full Code Here

      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getTasksByWorkflowId transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
View Full Code Here

        LOG.log(
            Level.SEVERE,
            "Unable to rollback workflow transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
View Full Code Here

        conn.rollback();
      } catch (SQLException e2) {
        LOG.log(Level.SEVERE, "Unable to rollback task transaction. Message: "
            + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
View Full Code Here

      } catch (SQLException e2) {
        LOG.log(Level.SEVERE,
            "Unable to rollback getConditions transaction. Message: "
                + e2.getMessage());
      }
      throw new RepositoryException(e.getMessage());
    } finally {

      if (rs != null) {
        try {
          rs.close();
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.workflow.structs.exceptions.RepositoryException

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.