Package gri.tasks

Examples of gri.tasks.Task


      WorkflowUtil.orderTasks(taskStubs);
     
      //execute:
      for (int i=0; i<taskStubs.length; i++) {
        TaskStub taskStub = taskStubs[i];
        Task task = createTask(taskStub);
       
        Map inputs = taskStub.getInputs();
        inputs = WorkflowUtil.resolveReferencedInputs(inputs, wkfl);
       
        Map outputs = task.execute(inputs);
        taskStub.setOutputs(outputs);
      }
    }
View Full Code Here


    System.out.println();
    System.out.println("Inputs:");
    print(inputs, "  ");
    System.out.println();
   
    Task task = taskManager.getTask(id);
    Map outputs = task.execute(inputs);
   
    System.out.println("Task complete!");
    System.out.println();
    System.out.println("Outputs:");
    print(outputs, "  ");
View Full Code Here

        Map inputs = new HashMap();
        inputs.put("message", "yo dude");
        inputs.put("prefix", "lalala");
        inputs.put("suffix", "xoxoxo");
       
        Task task = config.createTask();
        Map outputs = task.execute(inputs);
       
        System.out.println(outputs.get("output"));
        System.out.println(outputs.get("value"));
    }
View Full Code Here

        Map inputs = new HashMap();
        inputs.put("message", "yo dude");
        inputs.put("prefix", "lalala");
        inputs.put("suffix", "xoxoxo");
       
        Task task = entry.createTaskEntry().getTask();
        Map outputs = task.execute(inputs);
       
        System.out.println(outputs.get("output"));
        System.out.println(outputs.get("value"));
    }
View Full Code Here

      e.printStackTrace();
    }
  }
 
  public static void test1() throws Exception {
    Task addTask = new AddValues();
   
    Map inputs = new HashMap();
    inputs.put("x", new Integer(5));
    inputs.put("y", new Integer(20));
   
    Map outputs = addTask.execute(inputs);
    int result = ((Integer)outputs.get("result")).intValue();
    System.out.println("result: " + result);
  }
View Full Code Here

    return entry == null ?
        null : entry.getTaskDescription();
  }
 
  public TaskDef getTaskDefinition(String id) {
    Task task = getTask(id);
    return task == null ?
        null : task.getTaskDef();
  }
View Full Code Here

    System.out.println();
    System.out.println("Inputs:");
    print(inputs, "  ");
    System.out.println();
   
    Task task = taskManager.getTask(id);
    Map outputs = task.execute(inputs);
   
    System.out.println("Task complete!");
    System.out.println();
    System.out.println("Outputs:");
    print(outputs, "  ");
View Full Code Here

      System.out.println(taskDef);
    }
   
    else if (mode == RUN_TASK) {
     
      Task task = taskManager.getTask(moduleName);
     
      System.out.println("Loading parameters...");
      Map inputs = parseInputs(task);
      printParams(inputs, "Loaded:");
           
      System.out.println("Executing...");
      Map outputs = task.execute(inputs);
      printParams(outputs, "Outputs:");
     
      System.out.println("Job Complete!");
    }
   
View Full Code Here

TOP

Related Classes of gri.tasks.Task

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.