Package org.apache.oodt.cas.workflow.engine.processor

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


   *
   * @see java.lang.Runnable#run()
   */
  @Override
  public void run() {
    TaskProcessor nextTaskProcessor = null;

    while (running) {
      nextTaskProcessor = taskQuerier.getNext();

      try {
View Full Code Here


   *
   * @see org.apache.oodt.cas.workflow.engine.TaskQuerier#getNext()
   */
  @Override
  public TaskProcessor getNext() {
    TaskProcessor taskProcessor = super.getNext();
    if(taskProcessor == null) return null;
    Metadata met = new Metadata();
    met.addMetadata("StartDateTime", DateUtils.toString(Calendar.getInstance()));
    taskProcessor.getWorkflowInstance().setSharedContext(met);
    return taskProcessor;
  }
View Full Code Here

    }

    querier.setRunning(false);
    assertNotNull(runnables);
    assertEquals(2, runnables.size());
    TaskProcessor next = querier.getNext();
    assertNotNull(next);
    assertEquals(1, querier.getRunnableProcessors().size());
  }
View Full Code Here

  protected File testDir;

  private QuerierAndRunnerUtils utils;

  public void testRun() {
    TaskProcessor taskProcessor1 = null;
    TaskProcessor taskProcessor2 = null;

    try {
      taskProcessor1 = (TaskProcessor) utils.getProcessor(Priority.getDefault()
          .getValue(), "Executing", "running");
      taskProcessor2 = (TaskProcessor) utils.getProcessor(Priority.getDefault()
          .getValue(), "Executing", "running");
    } catch (Exception e) {
      fail(e.getMessage());
    }

    Metadata met = new Metadata();
    met.addMetadata("StartDateTime", DateUtils.toString(Calendar.getInstance()));

    taskProcessor1.getWorkflowInstance().getSharedContext().addMetadata(met);
    taskProcessor2.getWorkflowInstance().getSharedContext().addMetadata(met);

    try {
      runner.execute(taskProcessor1);
      runner.execute(taskProcessor2);
      assertTrue(ranFast());
View Full Code Here

    inst.setCurrentTaskId(workflow.getTasks().get(0).getTaskId());
    inst.setParentChildWorkflow(workflow);
    WorkflowProcessorBuilder builder = WorkflowProcessorBuilder
        .aWorkflowProcessor().withLifecycleManager(lifecycleManager)
        .withPriority(priority).withInstance(inst);
    TaskProcessor taskProcessor = (TaskProcessor) builder
        .build(TaskProcessor.class);
    taskProcessor.getWorkflowInstance().setState(lifecycleManager.getDefaultLifecycle().createState(
        stateName, categoryName, ""));   
    return taskProcessor;
  }
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.workflow.engine.processor.TaskProcessor

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.