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

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


            LOG.log(Level.INFO, "Getting workflows: retrieved: "
                    + workflowList.size() + " workflows");

            try {
                for (Iterator i = workflowList.iterator(); i.hasNext();) {
                    Workflow w = (Workflow) i.next();
                    Hashtable workflow = XmlRpcStructFactory
                            .getXmlRpcWorkflow(w);
                    workflows.add(workflow);
                }
View Full Code Here


    }

    public Hashtable getWorkflowById(String workflowId)
            throws RepositoryException {
        try {
            Workflow workflow = repo.getWorkflowById(workflowId);
            return XmlRpcStructFactory.getXmlRpcWorkflow(workflow);
        } catch (Exception e) {
            e.printStackTrace();
            throw new RepositoryException(
                    "Exception getting workflow by id from the repository: Message: "
View Full Code Here

            return repo.getWorkflowById(workflowId);
        } catch (Exception e) {
            e.printStackTrace();
            LOG.log(Level.WARNING, "Error getting workflow by its id: ["
                    + workflowId + "]: Message: " + e.getMessage());
            return new Workflow();
        }
    }
View Full Code Here

        inst.setSharedContext(sharedContext);

        // now read all of the workflow info

        Workflow workflow = new Workflow();

        workflow.setId(doc.get("workflow_id"));
        workflow.setName(doc.get("workflow_name"));
        workflow.setTasks(toTasks(doc));
        workflow.setConditions(toConditions("workflow_condition_"+workflow.getId(), doc));

        inst.setWorkflow(workflow);

        return inst;
    }
View Full Code Here

   * (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

   }

   @Override
   public List<WorkflowTask> getTasksByWorkflowId(String workflowId)
         throws RepositoryException {
      Workflow workflow = getWorkflowById(workflowId);
      List<WorkflowTask> tasks = Lists.newArrayList();
      if (workflow != null) {
         tasks.addAll(workflow.getTasks());
      }
      return tasks;
   }
View Full Code Here

   @Override
   public List<WorkflowTask> getTasksByWorkflowName(String workflowName)
         throws RepositoryException {
      List<WorkflowTask> tasks = Lists.newArrayList();
      Workflow workflow = getWorkflowByName(workflowName);
      if (workflow != null) {
         tasks.addAll(workflow.getTasks());
      }
      return tasks;
   }
View Full Code Here

   @Override
   public List<WorkflowCondition> getConditionsByWorkflowId(String workflowId)
         throws RepositoryException {
      List<WorkflowCondition> conditions = Lists.newArrayList();
      Workflow workflow = getWorkflowById(workflowId);
      if (workflow != null) {
         conditions.addAll(workflow.getConditions());
      }
      return conditions;
   }
View Full Code Here

     * @since OODT-205
     */
    public void testWorkflowConditions(){
      DataSourceWorkflowRepository repo = new DataSourceWorkflowRepository(ds);
           
      Workflow w = null;
      try{
        w = repo.getWorkflowById("1");
      }
      catch(Exception e){
        fail(e.getMessage());
      }
     
      assertNotNull(w);
      assertNotNull(w.getConditions());
      assertTrue(w.getConditions().size() > 0);
      assertEquals(w.getConditions().size(), 1);
    }
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.