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

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


  private void addConditionsToDoc(String taskId, List conditionList,
      Document doc) {
    if (conditionList != null && conditionList.size() > 0) {
      for (Iterator i = conditionList.iterator(); i.hasNext();) {
        WorkflowCondition cond = (WorkflowCondition) i.next();
        doc.add(new Field(taskId + "_condition_name", cond.getConditionName(),
            Field.Store.YES, Field.Index.NO));
        doc.add(new Field(taskId + "_condition_id", cond.getConditionId(),
            Field.Store.YES, Field.Index.UN_TOKENIZED));
        doc.add(new Field(taskId + "_condition_class", cond
            .getConditionInstanceClassName(), Field.Store.YES, Field.Index.NO));
        doc.add(new Field(taskId + "_condition_order", String.valueOf(cond
            .getOrder()), Field.Store.YES, Field.Index.NO));
        doc.add(new Field(taskId + "_condition_timeout", String.valueOf(cond
            .getTimeoutSeconds()), Field.Store.YES, Field.Index.NO));
        doc.add(new Field(taskId+"_condition_optional", String.valueOf(cond.isOptional()),
            Field.Store.YES, Field.Index.NO));
      }
    }
  }
View Full Code Here


                            + "rebuilding from given Document");
            return null;
        }

        for (int i = 0; i < condNames.length; i++) {
            WorkflowCondition cond = new WorkflowCondition();
            cond.setConditionId(condIds[i]);
            cond.setConditionInstanceClassName(condClasses[i]);
            cond.setConditionName(condNames[i]);
            cond.setOrder(Integer.parseInt(condOrders[i]));
            if(condTimeouts != null){
              cond.setTimeoutSeconds(Long.parseLong(condTimeouts[i]));
            }
            if(condOptionals != null){
              cond.setOptional(Boolean.valueOf(condOptionals[i]));
            }
        }

        return condList;
    }
View Full Code Here

      eventToWorkflowsMap = Maps.newHashMap();
      workflows = Maps.newHashMap();
      tasks = Maps.newHashMap();
      conditions = Maps.newHashMap();

      WorkflowCondition condition1 = new WorkflowCondition();
      condition1.setConditionId(CONDITION1_ID);
      condition1.setConditionName(CONDITION1_NAME);
      condition1.setConditionInstanceClassName("some.class.path");
      condition1.setCondConfig(cConf);
      conditions.put(condition1.getConditionId(), condition1);

      WorkflowCondition condition2 = new WorkflowCondition();
      condition2.setConditionId(CONDITION2_ID);
      condition2.setConditionName(CONDITION2_NAME);
      condition2.setCondConfig(cConf);
      condition2.setConditionInstanceClassName("some.class.path");
      conditions.put(condition2.getConditionId(), condition2);

      WorkflowCondition condition3 = new WorkflowCondition();
      condition3.setConditionId(CONDITION3_ID);
      condition3.setConditionName(CONDITION3_NAME);
      condition3.setCondConfig(cConf);
      condition3.setConditionInstanceClassName("some.class.path");
      conditions.put(condition3.getConditionId(), condition3);

      WorkflowCondition condition4 = new WorkflowCondition();
      condition4.setConditionId(CONDITION4_ID);
      condition4.setConditionName(CONDITION4_NAME);
      condition4.setCondConfig(cConf);
      condition4.setConditionInstanceClassName("some.class.path");
      conditions.put(condition4.getConditionId(), condition4);

      WorkflowTask task1 = new WorkflowTask();
      task1.setTaskId(TASK1_ID);
      task1.setTaskName(TASK1_NAME);
      task1.setTaskConfig(tConf);
View Full Code Here

TOP

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

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.