Examples of WorkflowTask


Examples of org.apache.oodt.cas.workflow.structs.WorkflowTask

   *          The XML-RPC Hashtable version of the WorkflowTask.
   * @return a {@link WorkflowTask} from an XML-RPC {@link Hashtable} sent over
   *         the wire.
   */
  public static WorkflowTask getWorkflowTaskFromXmlRpc(Hashtable task) {
    WorkflowTask t = new WorkflowTask();
    t.setTaskInstanceClassName((String) task.get("class"));
    t.setTaskId((String) task.get("id"));
    t.setTaskName((String) task.get("name"));
    t.setOrder(Integer.valueOf((String) task.get("order")).intValue());
    t.setTaskConfig(getWorkflowTaskConfigurationFromXmlRpc((Hashtable) task
        .get("configuration")));
    t.setConditions(getWorkflowConditionsFromXmlRpc((Vector) task
        .get("conditions")));
    t.setRequiredMetFields(getWorkflowTaskReqMetFieldsFromXmlRpc((Vector) task
        .get("requiredMetFields")));

    return t;
  }
View Full Code Here

Examples of org.apache.oodt.cas.workflow.structs.WorkflowTask

  public static List getWorkflowTasksFromXmlRpc(Vector tsks) {
    List tasks = new Vector();

    for (Iterator i = tsks.iterator(); i.hasNext();) {
      Hashtable taskHashtable = (Hashtable) i.next();
      WorkflowTask task = getWorkflowTaskFromXmlRpc(taskHashtable);
      tasks.add(task);

    }
    return tasks;
  }
View Full Code Here

Examples of org.apache.oodt.cas.workflow.structs.WorkflowTask

    if(taskList != null){

      List newTaskList = new Vector(taskList.size());

      for(Iterator i = taskList.iterator(); i.hasNext(); ){
        WorkflowTask t = (WorkflowTask)i.next();
        WorkflowTask newTask = copyTask(t);
        newTaskList.add(newTask);
      }

      return newTaskList;
    }
View Full Code Here

Examples of org.apache.oodt.cas.workflow.structs.WorkflowTask

    }
    else return null;
  }

  public static WorkflowTask copyTask(WorkflowTask t){
    WorkflowTask newTask = new WorkflowTask();
    newTask.setTaskConfig(t.getTaskConfig());
    newTask.setTaskId(t.getTaskId());
    newTask.setTaskName(t.getTaskName());
    newTask.setTaskInstanceClassName(t.getTaskInstanceClassName());
    newTask.setOrder(t.getOrder());
    newTask.setConditions(copyConditions(t.getConditions()));
    return newTask;
  }
View Full Code Here

Examples of org.apache.oodt.cas.workflow.structs.WorkflowTask

      tasks = new Vector();

      while (rs.next()) {
        // get an instance of the class name

        WorkflowTask task = DbStructFactory.getWorkflowTask(rs, true);

        if (task != null) {
          task.setConditions(getConditionsByTaskId(task.getTaskId()));
          task.setTaskConfig(getConfigurationByTaskId(task.getTaskId()));
          tasks.add(task);
        }
      }

      if (tasks.size() == 0) {
View Full Code Here

Examples of org.apache.oodt.cas.workflow.structs.WorkflowTask

      rs = statement.executeQuery(getTasksSql);
      tasks = new Vector();

      while (rs.next()) {
        // get an instance of the class name
        WorkflowTask task = DbStructFactory.getWorkflowTask(rs, true);

        if (task != null) {
          task.setConditions(getConditionsByTaskId(task.getTaskId()));
          task.setTaskConfig(getConfigurationByTaskId(task.getTaskId()));
          tasks.add(task);
        }
      }

      if (tasks.size() == 0) {
View Full Code Here

Examples of org.apache.oodt.cas.workflow.structs.WorkflowTask

      throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    WorkflowTask task = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getTaskSql = "SELECT * FROM workflow_tasks WHERE workflow_task_id = "
          + taskId;

      LOG.log(Level.FINE, "getWorkflowTaskById: Executing: " + getTaskSql);
      rs = statement.executeQuery(getTaskSql);

      while (rs.next()) {
        // get an instance of the class name
        task = DbStructFactory.getWorkflowTask(rs, false);
        task.setConditions(getConditionsByTaskId(task.getTaskId()));
        task.setTaskConfig(getConfigurationByTaskId(task.getTaskId()));
      }

    } catch (Exception e) {
      e.printStackTrace();
      LOG.log(Level.WARNING,
View Full Code Here

Examples of org.apache.oodt.cas.workflow.structs.WorkflowTask

  public WorkflowTask getTaskById(String taskId) throws RepositoryException {
    Connection conn = null;
    Statement statement = null;
    ResultSet rs = null;

    WorkflowTask task = null;

    try {
      conn = dataSource.getConnection();
      statement = conn.createStatement();

      String getTasksSql = "SELECT * "
          + "FROM workflow_tasks "
          + "WHERE workflow_task_id = " + taskId;

      LOG.log(Level.FINE, "getTaskById: Executing: " + getTasksSql);
      rs = statement.executeQuery(getTasksSql);
    

      while (rs.next()) {
        // get an instance of the class name

        task = DbStructFactory.getWorkflowTask(rs, true);

        if (task != null) {
          task.setConditions(getConditionsByTaskId(task.getTaskId()));
          task.setTaskConfig(getConfigurationByTaskId(task.getTaskId()));
        }
      }

    } catch (Exception e) {
      e.printStackTrace();
View Full Code Here

Examples of org.apache.oodt.cas.workflow.structs.WorkflowTask

      tasks = new Vector<WorkflowTask>();

      while (rs.next()) {
        // get an instance of the class name

        WorkflowTask task = DbStructFactory.getWorkflowTask(rs, true);

        if (task != null) {
          task.setConditions(getConditionsByTaskId(task.getTaskId()));
          task.setTaskConfig(getConfigurationByTaskId(task.getTaskId()));
          tasks.add(task);
        }
      }

      if (tasks.size() == 0) {
View Full Code Here

Examples of org.apache.oodt.cas.workflow.structs.WorkflowTask

    }
  }

  private WorkflowTask getGlobalWorkflowConditionsTask(Workflow workflow,
      List<WorkflowCondition> conditions) throws RepositoryException {
    WorkflowTask task = new WorkflowTask();
    task.setConditions(conditions);
    task.setTaskConfig(new WorkflowTaskConfiguration());
    task.setTaskId(workflow.getId() + "-global-conditions-eval");
    task.setTaskName(workflow.getName() + "-global-conditions-eval");
    task.setTaskInstanceClassName(NoOpTask.class.getName());
    task.setTaskId(this.commitTask(workflow, task));
    return task;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.