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

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


     * (non-Javadoc)
     *
     * @see org.apache.oodt.cas.workflow.repository.WorkflowRepository#getConditionsByTaskId(java.lang.String)
     */
    public List getConditionsByTaskId(String taskId) throws RepositoryException {
        WorkflowTask t = (WorkflowTask) taskMap.get(taskId);
        if (t != null) {
            return t.getConditions();
        } else
            return null;
    }
View Full Code Here


     *
     * @see org.apache.oodt.cas.workflow.repository.WorkflowRepository#getConfigurationByTaskId(java.lang.String)
     */
    public WorkflowTaskConfiguration getConfigurationByTaskId(String taskId)
            throws RepositoryException {
        WorkflowTask task = (WorkflowTask) taskMap.get(taskId);
        return task.getTaskConfig();
    }
View Full Code Here

                        + w.getName() + "]");

                System.out.println("Tasks: ");

                for (Iterator j = w.getTasks().iterator(); j.hasNext();) {
                    WorkflowTask task = (WorkflowTask) j.next();

                    System.out.println("Task: [class="
                            + task.getTaskInstanceClassName() + ", id="
                            + task.getTaskId() + ", name=" + task.getTaskName()
                            + ", order=" + task.getOrder() + ",reqMetFields="
                            + task.getRequiredMetFields() + "]");
                    System.out.println("Configuration: ");

                    for (Iterator k = task.getTaskConfig().getProperties()
                            .keySet().iterator(); k.hasNext();) {
                        String key = (String) k.next();
                        String value = (String) task.getTaskConfig()
                                .getProperties().get(key);

                        System.out.println("[name=" + key + ", value=" + value
                                + "]");
                    }

                    System.out.println("Conditions: ");

                    for (Iterator k = task.getConditions().iterator(); k
                            .hasNext();) {
                        WorkflowCondition condition = (WorkflowCondition) k
                                .next();
                        System.out.println("Condition: ["
                                + condition.getClass().getName() + ", id="
View Full Code Here

                        if (taskElemList != null
                                && taskElemList.getLength() > 0) {
                            for (int j = 0; j < taskElemList.getLength(); j++) {
                                Element taskElem = (Element) taskElemList
                                        .item(j);
                                WorkflowTask task = XmlStructFactory
                                        .getWorkflowTask(taskElem, conditionMap);
                                if (task != null) {
                                    taskMap.put(task.getTaskId(), task);
                                }
                            }

                        }
                    }
View Full Code Here

        if (tasks == null) {
            return wTasks;
        }

        for (Iterator i = tasks.iterator(); i.hasNext();) {
            WorkflowTask t = (WorkflowTask) i.next();
            Hashtable task = getXmlRpcWorkflowTask(t);
            wTasks.add(task);
        }

        return wTasks;
View Full Code Here

     *            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

    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

      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

      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

      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

TOP

Related Classes of org.apache.oodt.cas.workflow.structs.WorkflowTask

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.