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

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


    @Test
    public void testScheduleDynamically() throws IOException, URISyntaxException, WorkflowException {
        logger.info("Running ComplexMathWorkflowTest...");
        URL systemResource = this.getClass().getClassLoader().getSystemResource("ComplexMath.xwf");
        Workflow workflow = new Workflow(WorkflowTestUtils.readWorkflow(systemResource));
        XBayaConfiguration conf = WorkflowTestUtils.getConfiguration();
//        AiravataRegistry2 registry = conf.getJcrComponentRegistry()==null? null:conf.getJcrComponentRegistry().getRegistry();
//    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow, UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), registry, conf, null,null,true);
    WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(workflow,
                UUID.randomUUID().toString(),conf.getMessageBoxURL(), conf.getBrokerURL(), conf.getAiravataAPI(), conf, null,null,true);
View Full Code Here


        Assert.assertTrue(airavataAPI.getApplicationManager().isApplicationDescriptorExists(
                serviceDescription.getType().getName(), hostDescription.getType().getHostName(),
                applicationDeploymentDescription.getType().getApplicationName().getStringValue()));

        log("Saving workflow ...");
        Workflow workflow = new Workflow(getWorkflowComposeContent("src/test/resources/EchoWorkflow.xwf"));
        airavataAPI.getWorkflowManager().addWorkflow(workflow);

        Assert.assertTrue(airavataAPI.getWorkflowManager().isWorkflowExists(workflow.getName()));

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

        runWorkFlow(workflow, Arrays.asList("echo_output=Airavata_Test"));
    }
View Full Code Here

        Assert.assertTrue(airavataAPI.getApplicationManager().isApplicationDescriptorExists(
                serviceDescription.getType().getName(), hostDescription.getType().getHostName(),
                applicationDeploymentDescription.getType().getApplicationName().getStringValue()));

        log("Saving workflow ...");
        Workflow workflow = new Workflow(getWorkflowComposeContent("src/test/resources/EchoWorkflow.xwf"));

        try {
            airavataAPI.getWorkflowManager().addWorkflow(workflow);
            Assert.fail("Workflow should already exists and should go to update.");
        } catch (DescriptorRecordAlreadyExistsException e) {

            log("Updating workflow...");
            airavataAPI.getWorkflowManager().updateWorkflow(workflow);
        }

        Assert.assertTrue(airavataAPI.getWorkflowManager().isWorkflowExists(workflow.getName()));

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

        try {
            runWorkFlowWithoutMonitor(workflow, Arrays.asList("echo_output=Airavata_Test"));
View Full Code Here

    }

    @Override
    public void addOwnerWorkflow (URI workflowPath, String owner)
            throws AiravataAPIInvocationException, DescriptorRecordAlreadyExistsException {
        Workflow workflow = getWorkflowFromURI(workflowPath);
        addWorkflow(workflow, XMLUtil.xmlElementToString(workflow.toXML()), owner);
    }
View Full Code Here

    }

    @Override
    public void updateOwnerWorkflow (URI workflowPath, String owner)
            throws AiravataAPIInvocationException {
        Workflow workflow = getWorkflowFromURI(workflowPath);
        updateWorkflow(workflow, XMLUtil.xmlElementToString(workflow.toXML()), owner);
    }
View Full Code Here

  @Override
  public Workflow getWorkflowFromString(String workflowAsString)
      throws AiravataAPIInvocationException {
    try {
      return new Workflow(workflowAsString);
    } catch (Exception e) {
      throw new AiravataAPIInvocationException(e);
    }
  }
View Full Code Here

  }

    @Override
    public Workflow getWorkflowFromURI(URI workflowPath) throws AiravataAPIInvocationException {
        try {
            return new Workflow(workflowPath);
        } catch (Exception e) {
            throw new AiravataAPIInvocationException(e);
        }
    }
View Full Code Here

    }
    return builder;
  }

    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

  }

  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

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.