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

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


   * (java.lang.String)
   */
  @Override
  public List getTasksByWorkflowId(String workflowId)
      throws RepositoryException {
    Workflow w = this.getWorkflowById(workflowId);
    return w.getTasks();
  }
View Full Code Here


   * getTasksByWorkflowName(java.lang.String)
   */
  @Override
  public List getTasksByWorkflowName(String workflowName)
      throws RepositoryException {
    Workflow w = this.getWorkflowByName(workflowName);
    if (w != null) {
      return w.getTasks();
    } else
      return Collections.emptyList();
  }
View Full Code Here

     */
    public Workflow getWorkflowByName(String workflowName)
            throws RepositoryException {
        for (Iterator i = workflowMap.keySet().iterator(); i.hasNext();) {
            String workflowId = (String) i.next();
            Workflow w = (Workflow) workflowMap.get(workflowId);

            if (w.getName().equals(workflowName)) {
                return w;
            }
        }

        return null;
View Full Code Here

     *
     * @see org.apache.oodt.cas.workflow.repository.WorkflowRepository#getTasksByWorkflowId(java.lang.String)
     */
    public List getTasksByWorkflowId(String workflowId)
            throws RepositoryException {
        Workflow w = getWorkflowById(workflowId);
        return w.getTasks();
    }
View Full Code Here

     *
     * @see org.apache.oodt.cas.workflow.repository.WorkflowRepository#getTasksByWorkflowName(java.lang.String)
     */
    public List getTasksByWorkflowName(String workflowName)
            throws RepositoryException {
        Workflow w = getWorkflowByName(workflowName);
        return w.getTasks();
    }
View Full Code Here

        List workflows = repo.getWorkflows();

        if (workflows != null) {
            for (Iterator i = workflows.iterator(); i.hasNext();) {
                Workflow w = (Workflow) i.next();
                System.out.println("Workflow: [id=" + w.getId() + ", name="
                        + 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()
View Full Code Here

                            Document workflowRoot = getDocumentRoot(workflowXmlFile);

                            String workflowId = workflowRoot
                                    .getDocumentElement().getAttribute("id");
                            if (workflowMap.get(workflowId) == null) {
                                Workflow w = XmlStructFactory.getWorkflow(
                                        workflowRoot.getDocumentElement(),
                                        taskMap);
                                workflowMap.put(workflowId, w);
                            } else {
                                LOG
View Full Code Here

                                Element eventElem = (Element) eventElemList
                                        .item(j);

                                String eventName = eventElem
                                        .getAttribute("name");
                                Workflow w = null;

                                NodeList workflowNodeList = eventElem
                                        .getElementsByTagName("workflow");

                                if (workflowNodeList != null
View Full Code Here

     * @param w
     *            The Hashtable to obtain a Workflow from.
     * @return a {@link Workflow} from the XML-RPC {@link Hashtable} version.
     */
    public static Workflow getWorkflowFromXmlRpc(Hashtable w) {
        Workflow workflow = new Workflow();
        workflow.setName((String) w.get("name"));
        workflow.setId((String) w.get("id"));
        workflow.setTasks(getWorkflowTasksFromXmlRpc((Vector) w.get("tasks")));

        return workflow;
    }
View Full Code Here

      throws RepositoryException, EngineException {
    if (taskIds == null || (taskIds != null && taskIds.size() == 0))
      throw new RepositoryException(
          "Must specify task identifiers to build dynamic workflows!");

    Workflow dynamicWorkflow = new Workflow();

    for (String taskId : taskIds) {
      WorkflowTask task = this.repo.getWorkflowTaskById(taskId);
      if (task == null)
        throw new RepositoryException("Dynamic workflow task: [" + taskId
            + "] is not defined!");
      dynamicWorkflow.getTasks().add(task);
    }
   
    dynamicWorkflow.setId(this.repo.addWorkflow(dynamicWorkflow));
    dynamicWorkflow.setName("Dynamic Workflow-" + dynamicWorkflow.getId());

    Metadata met = new Metadata();
    met.addMetadata(metadata);

    WorkflowInstance inst = this.engine.startWorkflow(dynamicWorkflow, met);
View Full Code Here

TOP

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

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.