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

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


                            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

  private static final int stdPgSz = 20;

  public TestXmlRpcWorkflowManagerClient() {

    testWrkInst = new WorkflowInstance();
    testWrkFlw = new Workflow();
    testTask = new WorkflowTask();
    testCond = new WorkflowCondition();
    Metadata sharedContext = new Metadata();

    // to check if the path already exists and to delete if it does exist
View Full Code Here

   
    private String tmpDirPath = null;

    public TestLuceneWorkflowInstanceRepository() {
        testInst = new WorkflowInstance();
        testWkflw = new Workflow();
        testTask = new WorkflowTask();
        testCond = new WorkflowCondition();
        testWkflw.setName("test.workflow");
        testWkflw.setId("test.id");
        List tasks = new Vector();
View Full Code Here

    Element workflowRoot = (Element) node;

    String id = workflowRoot.getAttribute("id");
    String name = workflowRoot.getAttribute("name");

    Workflow workflow = new Workflow();
    workflow.setName(name);
    workflow.setId(id);

    Element taskElem = getFirstElement("tasks", workflowRoot);
    Element conditionsElem = getFirstElement("conditions", workflowRoot);

    if (taskElem != null)
      workflow.setTasks(getTasks(taskElem, tasks));
    if (conditionsElem != null)
      workflow.setConditions(getConditions(conditionsElem, conditions));

    return workflow;
  }
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")));
    workflow.setConditions(getWorkflowConditionsFromXmlRpc((Vector) w
        .get("conditions")));

    return workflow;
  }
View Full Code Here

   * @return A new {@link Workflow} implementation specified by its class
   *         name.
   */
  public static Workflow getWorkflowObjectFromClassName(String className){
    if (className != null) {
      Workflow workflow = null;

      try {
        Class workflowClass = Class.forName(className);
        workflow = (Workflow) workflowClass
            .newInstance();
View Full Code Here

  public static List copyWorkflows(List workflows){
    if(workflows != null){
      List newWorkflows = new Vector(workflows.size());
      for(Iterator i = workflows.iterator(); i.hasNext(); ){
        Workflow w = (Workflow)i.next();
        Workflow newWorkflow = copyWorkflow(w);
        newWorkflows.add(newWorkflow);
      }

      return newWorkflows;
    }
View Full Code Here

   *
   * @param w The Workflow object to create a copy of.
   * @return A copy of the specified Workflow.
   */
  public static Workflow copyWorkflow(Workflow w){
    Workflow newWorkflow = null;


    newWorkflow = getWorkflowObjectFromClassName(w.getClass().getName());


    //copy through
    newWorkflow.setName(w.getName());
    newWorkflow.setId(w.getId());
    newWorkflow.setTasks(copyTasks(w.getTasks()));

    return newWorkflow;
  }
View Full Code Here

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

    Workflow workflow = null;

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

      String getWorkflowSql = "SELECT * from workflows WHERE workflow_name = '"
          + workflowName + "'";

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

      while (rs.next()) {
        workflow = DbStructFactory.getWorkflow(rs);

        if (getTasks) {
          workflow.setTasks(getTasksByWorkflowId(workflow.getId()));
        }

        if (getConditions) {
          workflow.setConditions(getConditionsByWorkflowId(workflow.getId()));
          handleGlobalWorkflowConditions(workflow);
        }
      }

    } catch (Exception e) {
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.