Package org.apache.airavata.workflow.model.wf

Examples of org.apache.airavata.workflow.model.wf.Workflow


      List<String> inputs, List<String> outputs) throws GraphException,
      ComponentException, IOException, WorkflowAlreadyExistsException,
      AiravataAPIInvocationException, Exception {
        log("Saving workflow ...");

    Workflow workflow = new Workflow(getWorkflowComposeContent(workflowFilePath));
    if (!airavataAPI.getWorkflowManager().isWorkflowExists(workflow.getName())){
      airavataAPI.getWorkflowManager().addWorkflow(workflow);
    }
    Assert.assertTrue(airavataAPI.getWorkflowManager().isWorkflowExists(workflow.getName()));

        log("Workflow setting up completed ...");

    runWorkFlow(workflow, inputs,outputs);
  }
View Full Code Here


          throw new AiravataAPIInvocationException("Error working with Airavata Registry: " + e.getLocalizedMessage(), e);
      }
  }

    private Workflow extractWorkflow(String workflowName) throws AiravataAPIInvocationException {
        Workflow workflowObj = null;
        //FIXME - There should be a better way to figure-out if the passed string is a name or an xml
        if(!workflowName.contains("http://airavata.apache.org/xbaya/xwf")){//(getClient().getWorkflowManager().isWorkflowExists(workflowName)) {
            workflowObj = getClient().getWorkflowManager().getWorkflow(workflowName);
        }else {
            try{
View Full Code Here

    public void testRunWorkflowTrestlesOGCE() throws Exception {

        WorkflowExecutor workflowExecutor = getSampleGatewayExecutor();
        ExecutionParameters executionParameters = getTrestlesOGCEParameters();

        Workflow workflow = workflowExecutor.setupExperiment(executionParameters);
        workflowExecutor.runWorkflow(workflow, Arrays.asList("echo_output=Hello World"));

    }
View Full Code Here

    public void testRunWorkflowStampedeOGCE() throws Exception {

        WorkflowExecutor workflowExecutor = getSampleGatewayExecutor();
        ExecutionParameters executionParameters = getStampedeOGCEParameters();

        Workflow workflow = workflowExecutor.setupExperiment(executionParameters);
        workflowExecutor.runWorkflow(workflow, Arrays.asList("echo_output=Hello World"));

        System.out.println("sadsd");

    }
View Full Code Here

    public void testRunWorkflowStampedeUS3() throws Exception {

        WorkflowExecutor workflowExecutor = getSampleGatewayExecutor();
        ExecutionParameters executionParameters = getStampedeUS3Parameters();

        Workflow workflow = workflowExecutor.setupExperiment(executionParameters);
        workflowExecutor.runWorkflow(workflow, Arrays.asList("echo_output=Hello World"));

    }
View Full Code Here

    public void testRunWorkflowStampedeUS3WithToken() throws Exception {

        WorkflowExecutor workflowExecutor = getSampleGatewayExecutor();
        ExecutionParameters executionParameters = getStampedeUS3Parameters();

        Workflow workflow = workflowExecutor.setupExperiment(executionParameters);
        workflowExecutor.runWorkflow(workflow, Arrays.asList("echo_output=Hello World"),
                "9964c023-7d30-4247-a6eb-b0c9cd7be138", "bunny");

    }
View Full Code Here

  }

  private void handleSubWorkComponent(Node node) throws WorkflowException {
    notifyViaInteractor(WorkflowExecutionMessage.OPEN_SUBWORKFLOW, node);
    // setting the inputs
    Workflow subWorkflow = ((SubWorkflowNode) node).getWorkflow();
    ArrayList<Node> subWorkflowInputNodes = getInputNodes(subWorkflow);

    List<DataPort> inputPorts = node.getInputPorts();
    for (DataPort port : inputPorts) {
      Object inputVal = InterpreterUtil.findInputFromPort(port, this.invokerMap);
View Full Code Here

        }

        final LinkedList<String> listOfValues = new LinkedList<String>();
        InterpreterUtil.getInputsForForEachNode(forEachNode, listOfValues, this.invokerMap);
        final Integer[] inputNumbers = InterpreterUtil.getNumberOfInputsForForEachNode(forEachNode, this.invokerMap);
        Workflow workflow1 = ((SubWorkflowNode) middleNode).getWorkflow();
        List<NodeImpl> nodes = workflow1.getGraph().getNodes();
        List<Node> wsNodes = new ArrayList<Node>();
        /* Take the List of WSNodes in the subworkflow */
        for (NodeImpl subWorkflowNode : nodes) {
          if (subWorkflowNode instanceof WSNode) {
            wsNodes.add(subWorkflowNode);
View Full Code Here

    private String setupAndLaunch(String workflowAsString, String topic, String gatewayId, String username,
                                  NameValue[] inputs,Map<String,String>configurations,boolean inNewThread,
                                  WorkflowContextHeaderBuilder builder) throws AiravataAPIInvocationException{
        log.debug("Launch is called for topic:"+topic);

        Workflow workflow = null;
        try {
            workflow = new Workflow(workflowAsString);
            log.debug("Workflow Object created");
        } catch (GraphException e1) {
            e1.printStackTrace();
        } catch (ComponentException e1) {
            e1.printStackTrace();
View Full Code Here

    @Test
    public void testScheduleDynamically() throws IOException, URISyntaxException, WorkflowException {
        logger.info("Running WorkflowTest...");
        URL systemResource = this.getClass().getClassLoader().getSystemResource("SimpleEcho.xwf");
        Workflow workflow = new Workflow(WorkflowTestUtils.readWorkflow(systemResource));
        ((InputNode) workflow.getGraph().getNode("input")).setDefaultValue("1");
        XBayaConfiguration conf = WorkflowTestUtils.getConfiguration();
        AiravataRegistry registry = conf.getJcrComponentRegistry()==null? null:conf.getJcrComponentRegistry().getRegistry();
    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow, UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), registry, conf, null,null,null,true);
    workflowInterpreterConfiguration.setNotifier(new StandaloneNotificationSender(workflowInterpreterConfiguration.getTopic(),workflowInterpreterConfiguration.getWorkflow()));
        SSWorkflowInterpreterInteractorImpl ssWorkflowInterpreterInteractorImpl = new SSWorkflowInterpreterInteractorImpl();
View Full Code Here

TOP

Related Classes of org.apache.airavata.workflow.model.wf.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.