Package org.data2semantics.platform.core

Examples of org.data2semantics.platform.core.Workflow


  @Test
  public void testAnnotationBasedWrapper() throws Exception {
   
    WorkflowParser parser = new WorkflowParser();
   
    Workflow workflowContainer = parser.parseYAML("src/test/resources/multi-modules.yaml");
   
    //workflowContainer.run();
   
    //workflowContainer.dumpIntermediateResults();
   
View Full Code Here


public class TestDiamonds {
  @Test
  public void testDiamond() throws Exception {
   
    Workflow workflow = WorkflowParser.parseYAML("src/test/resources/Diamond.yaml");
   
    ResourceSpace resourceSpace = new ResourceSpace();
   
    ExecutionProfile localExecutionProfile = new LocalExecutionProfile();
   
    Orchestrator platformOrchestrator = new Orchestrator(workflow, localExecutionProfile, resourceSpace);
   
    platformOrchestrator.orchestrate();
   
    for(Module m : workflow.modules()){
      System.out.println("\nModule " + m.name());
     
      for(ModuleInstance mi :  m.instances()){
          for(InstanceOutput io : mi.outputs())
          System.out.print(io.name()+":"+io.value()+ " ");
      }
    }
   
       
   
    assertEquals(2, workflow.getModuleByName("A").instances().size());
    assertEquals(4, workflow.getModuleByName("B").instances().size());
    assertEquals(4, workflow.getModuleByName("C").instances().size());
    assertEquals(8, workflow.getModuleByName("D").instances().size());
         
  }
View Full Code Here

  }
 
  @Test
  public void testDiamondRef() throws Exception {
   
    Workflow workflow = WorkflowParser.parseYAML("src/test/resources/DiamondWithRef.yaml");
   
    ResourceSpace resourceSpace = new ResourceSpace();
   
    ExecutionProfile localExecutionProfile = new LocalExecutionProfile();
   
    Orchestrator platformOrchestrator = new Orchestrator(workflow, localExecutionProfile, resourceSpace);
   
    platformOrchestrator.orchestrate();
   
    for(Module m : workflow.modules()){
      System.out.println("\nModule " + m.name());
     
      for(ModuleInstance mi :  m.instances()){
          for(InstanceOutput io : mi.outputs())
          System.out.print(io.name()+":"+io.value()+ " ");
      }
    }
   
       
   
    assertEquals(2, workflow.getModuleByName("A").instances().size());
    assertEquals(4, workflow.getModuleByName("B").instances().size());
    assertEquals(4, workflow.getModuleByName("C").instances().size());
    assertEquals(16, workflow.getModuleByName("D").instances().size());
         
  }
View Full Code Here

  }
 
  @Test
  public void testBrokenDiamond() throws Exception {
   
    Workflow workflow = WorkflowParser.parseYAML("src/test/resources/BrokenDiamond.yaml");
   
    ResourceSpace resourceSpace = new ResourceSpace();
   
    ExecutionProfile localExecutionProfile = new LocalExecutionProfile();
   
    Orchestrator platformOrchestrator = new Orchestrator(workflow, localExecutionProfile, resourceSpace);
   
    platformOrchestrator.orchestrate();
   
    for(Module m : workflow.modules()){
      System.out.println("\nModule " + m.name());
     
      for(ModuleInstance mi :  m.instances()){
          for(InstanceOutput io : mi.outputs())
          System.out.print(io.name()+":"+io.value()+ " ");
      }
    }
   
       
   
    assertEquals(2, workflow.getModuleByName("A").instances().size());
    assertEquals(4, workflow.getModuleByName("B").instances().size());
    assertEquals(4, workflow.getModuleByName("C").instances().size());
    assertEquals(4, workflow.getModuleByName("D").instances().size());
         
  }
View Full Code Here

  }
 
  @Test
  public void testTriangle() throws Exception {
   
    Workflow workflow = WorkflowParser.parseYAML("src/test/resources/Triangle.yaml");
   
    ResourceSpace resourceSpace = new ResourceSpace();
   
    ExecutionProfile localExecutionProfile = new LocalExecutionProfile();
   
    Orchestrator platformOrchestrator = new Orchestrator(workflow, localExecutionProfile, resourceSpace);
   
    platformOrchestrator.orchestrate();
   

       
   
    assertEquals(2, workflow.getModuleByName("A").instances().size());
    assertEquals(4, workflow.getModuleByName("B").instances().size());
    assertEquals(4, workflow.getModuleByName("C").instances().size());

         
  }
View Full Code Here

  //@Test
  public void testFirstWorkflowWithKernelModules() throws Exception {
   
    WorkflowParser parser = new WorkflowParser();
   
    Workflow workflowContainer = parser.parseYAML("src/main/resources/DMoLD-experiment.yaml");
   
    ResourceSpace resourceSpace = new ResourceSpace();
   
    LocalExecutionProfile localExecutionProfile = new LocalExecutionProfile();
   
View Full Code Here

      // * Scan the classpath for any Domains and add them dynamically to the
      //   global Domain store.
     
      // * Read the workflow description from a yaml file into a map
     
      Workflow workflow = WorkflowParser.parseYAML(file);
     
      // -- The workflow object will check the consistency of the inputs and
      //    outputs and make sure that everything can be executed. 
           
      // Set the status file
View Full Code Here

TOP

Related Classes of org.data2semantics.platform.core.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.