Examples of WorkflowProcessor


Examples of org.apache.oodt.cas.workflow.engine.WorkflowProcessor

  public WorkflowProcessor findProcessor(WorkflowProcessor wp, String modelId) {
    if (wp.getWorkflowInstance().getParentChildWorkflow().getId()
        .equals(modelId))
      return wp;
    WorkflowProcessor found = findProcessor(wp.getSubProcessors(), modelId);
    if (found == null) {
      if (wp.getPreConditions() != null)
        found = findProcessor(wp.getPreConditions(), modelId);
      if (found == null && wp.getPostConditions() != null)
        found = findProcessor(wp.getPostConditions(), modelId);
View Full Code Here

Examples of org.apache.oodt.cas.workflow.engine.WorkflowProcessor

  public List<WorkflowProcessor> getTasks(WorkflowProcessor skeleton) {
    List<WorkflowProcessor> options = new Vector<WorkflowProcessor>();
    options.add(skeleton);
    List<WorkflowProcessor> tasks = new Vector<WorkflowProcessor>();
    while (!options.isEmpty()) {
      WorkflowProcessor currentOption = options.remove(0);
      if (currentOption.getSubProcessors().isEmpty()) {
        tasks.add(currentOption);
      } else {
        if (currentOption.getPreConditions() != null)
          options.add(currentOption.getPreConditions());
        if (currentOption.getPostConditions() != null)
          options.add(currentOption.getPostConditions());
        for (WorkflowProcessor ps : currentOption.getSubProcessors())
          options.add(ps);
      }
    }
    return tasks;
  }
View Full Code Here

Examples of org.apache.oodt.cas.workflow.engine.processor.WorkflowProcessor

    this.dateGen = 0;
  }

  public void testSort() throws InstantiationException {
    FILOPrioritySorter sorter = new FILOPrioritySorter();
    WorkflowProcessor proc = getProcessor(2.0);
    WorkflowProcessor proc2 = getProcessor(7.0);
    WorkflowProcessor proc3 = getProcessor(9.0);
    List<WorkflowProcessor> candidates = new Vector<WorkflowProcessor>();
    candidates.add(proc3);
    candidates.add(proc2);
    candidates.add(proc);   
    sorter.sort(candidates);
View Full Code Here

Examples of org.apache.oodt.cas.workflow.engine.processor.WorkflowProcessor

  }
 
 
  public void testSort() throws InstantiationException {
    HighestPrioritySorter sorter = new HighestPrioritySorter();
    WorkflowProcessor proc = getProcessor(2.0);
    WorkflowProcessor proc2 = getProcessor(7.0);
    List<WorkflowProcessor> candidates = new Vector<WorkflowProcessor>();
    candidates.add(proc);
    candidates.add(proc2);
    System.out.println("BEFORE sort: ["+candidates+"]");
    sorter.sort(candidates);
View Full Code Here

Examples of org.apache.oodt.cas.workflow.engine.processor.WorkflowProcessor

    this.dateGen = 0;
  }
 
  public void testSort() throws InstantiationException {
    HighestFIFOPrioritySorter sorter = new HighestFIFOPrioritySorter(1, 15.0, 25.0);
    WorkflowProcessor proc = getProcessor(2.0);
    WorkflowProcessor proc2 = getProcessor(7.0);
    List<WorkflowProcessor> candidates = new Vector<WorkflowProcessor>();
    candidates.add(proc);
    candidates.add(proc2);
    sorter.sort(candidates);
    assertNotNull(candidates);
View Full Code Here

Examples of org.geomajas.gwt.client.map.workflow.WorkflowProcessor

    FeatureTransaction featureTransaction = mapModel.getFeatureEditor().getFeatureTransaction();
    if (featureTransaction != null) {
      List<Activity> activities = new ArrayList<Activity>();
      activities.add(new ValidationActivity());
      activities.add(new CommitActivity());
      WorkflowProcessor processor = new SequenceProcessor(new MapModelWorkflowContext());
      processor.setDefaultErrorHandler(new WorkflowErrorHandler() {

        public void handleError(WorkflowContext context, Throwable throwable) {
          SC.warn(I18nProvider.getGlobal().saveEditingAborted() + throwable.getMessage());
        }
      });
      processor.setActivities(activities);
      processor.doActivities(mapModel);

      // Cleaning up duties: controller and MapWidget (if they're present)
      if (controller != null) {
        controller.cleanup();
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.