Examples of WorkflowInterpretorStub


Examples of edu.indiana.extreme.xbaya.interpretor.WorkflowInterpretorStub

          } catch (MonitorException e1) {
            DynamicWorkflowRunnerWindow.this.engine.getErrorWindow().error(e1);
          }
          try {

            WorkflowInterpretorStub stub = new WorkflowInterpretorStub("http://silktree.cs.indiana.edu:18080/axis2/services/WorkflowInterpretor?wsdl");
            NameValue[] configurations = new NameValue[6];
            configurations[0] = new NameValue();
            configurations[0].setName(HeaderConstants.HEADER_ELEMENT_GFAC);
            configurations[0].setValue(engine.getConfiguration().getGFacURL().toString());
            configurations[1] = new NameValue();
            configurations[1].setName(HeaderConstants.HEADER_ELEMENT_XREGISTRY);
            if (null == engine.getConfiguration().getXRegistryURL()) {
              configurations[1].setValue(XBayaConstants.DEFAULT_XREGISTRY_URL.toString());
            } else {
              configurations[1].setValue(engine.getConfiguration().getXRegistryURL().toString());
            }
            configurations[2] = new NameValue();
            configurations[2].setName(HeaderConstants.HEADER_ELEMENT_PROXYSERVER);
            configurations[2].setValue(engine.getConfiguration().getMyProxyServer());

            configurations[3] = new NameValue();
            configurations[3].setName(HeaderConstants.HEADER_ELEMENT_BROKER);
            configurations[3].setValue(engine.getConfiguration().getBrokerURL().toString());

            configurations[4] = new NameValue();
            configurations[4].setName(HeaderConstants.HEADER_ELEMENT_MSGBOX);
            configurations[4].setValue(engine.getConfiguration().getMessageBoxURL().toString());

            configurations[5] = new NameValue();
            configurations[5].setName(HeaderConstants.HEADER_ELEMENT_DSC);
            configurations[5].setValue(engine.getConfiguration().getDSCURL().toString());

            NameValue[] inputNameVals = new NameValue[inputNodes.size()];
            for (int i = 0; i < inputNodes.size(); i++) {
              inputNameVals[i] = new NameValue();
              InputNode inputNode = inputNodes.get(i);
              String id = inputNode.getID();
              String value = inputNode.getDefaultValue().toString();
              inputNameVals[i].setName(id);
              inputNameVals[i].setValue(value);
            }

            // WorkflowInterpretorSkeleton skel = new
            // WorkflowInterpretorSkeleton();
            //
            // skel.launchWorkflow(workflow.toXMLText(),
            // topicString,
            // "changeme", "chathura", inputNameVals,
            // configurations);

            String myProxyUsername = engine.getMyProxyClient().getUsername();
            String myProxyPass = engine.getMyProxyClient().getPassphrase();

            stub.launchWorkflow(workflow.toXMLText(), topicString, myProxyPass, myProxyUsername, inputNameVals, configurations);
          } catch (Exception e) {
            DynamicWorkflowRunnerWindow.this.engine.getErrorWindow().error(e);
          }
        } else {
View Full Code Here

Examples of edu.indiana.extreme.xbaya.interpretor.WorkflowInterpretorStub

        } catch (MonitorException e1) {
          WorkflowInterpreterLaunchWindow.this.engine.getErrorWindow().error(e1);
        }
        try {
                 
          WorkflowInterpretorStub stub = new WorkflowInterpretorStub(
              engine.getConfiguration().getWorkflowInterpreterURL().toString());
          NameValue[] configurations = new NameValue[6];
          configurations[0] = new NameValue();
          configurations[0]
              .setName(HeaderConstants.HEADER_ELEMENT_GFAC);
          configurations[0].setValue(engine.getConfiguration()
              .getGFacURL().toString());
          configurations[1] = new NameValue();
          configurations[1]
              .setName(HeaderConstants.HEADER_ELEMENT_XREGISTRY);
          if (null == engine.getConfiguration().getXRegistryURL()) {
            configurations[1]
                .setValue(XBayaConstants.DEFAULT_XREGISTRY_URL
                    .toString());
          } else {
            configurations[1].setValue(engine
                .getConfiguration().getXRegistryURL()
                .toString());
          }
          configurations[2] = new NameValue();
          configurations[2]
              .setName(HeaderConstants.HEADER_ELEMENT_PROXYSERVER);
          configurations[2].setValue(engine.getConfiguration()
              .getMyProxyServer());

          configurations[3] = new NameValue();
          configurations[3]
              .setName(HeaderConstants.HEADER_ELEMENT_BROKER);
          configurations[3].setValue(engine.getConfiguration()
              .getBrokerURL().toString());

          configurations[4] = new NameValue();
          configurations[4]
              .setName(HeaderConstants.HEADER_ELEMENT_MSGBOX);
          configurations[4].setValue(engine.getConfiguration()
              .getMessageBoxURL().toString());

          configurations[5] = new NameValue();
          configurations[5]
              .setName(HeaderConstants.HEADER_ELEMENT_DSC);
          configurations[5].setValue(engine.getConfiguration()
              .getDSCURL().toString());

          NameValue[] inputNameVals = new NameValue[inputNodes
              .size()];
          for (int i = 0; i < inputNodes.size(); i++) {
            inputNameVals[i] = new NameValue();
            InputNode inputNode = inputNodes.get(i);
            String id = inputNode.getID();
            String value = inputNode.getDefaultValue().toString();
            inputNameVals[i].setName(id);
            inputNameVals[i].setValue(value);
          }
         
          String myProxyUsername = engine.getMyProxyClient().getUsername();
          String myProxyPass = engine.getMyProxyClient().getPassphrase();
                 
          stub.launchWorkflow(workflow.toXMLText(), topicString,
              myProxyPass, myProxyUsername, inputNameVals,
              configurations);
        } catch (Exception e) {
          WorkflowInterpreterLaunchWindow.this.engine.getErrorWindow().error(e);
        }
View Full Code Here

Examples of org.apache.airavata.client.stub.interpretor.WorkflowInterpretorStub

 
  private void launchWorkflow(String experimentId, String workflowGraph, NameValue[] inputs,
      WorkflowContextHeaderBuilder builder) throws AiravataAPIInvocationException {
    try {
      builder.getWorkflowMonitoringContext().setExperimentId(experimentId);
      WorkflowInterpretorStub stub = new WorkflowInterpretorStub(getClient().getAiravataManager().getWorkflowInterpreterServiceURL().toString());
      stub._getServiceClient().addHeader(
          AXIOMUtil.stringToOM(XMLUtil.xmlElementToString(builder
              .getXml())));
      stub.launchWorkflow(workflowGraph, experimentId, inputs);
    } catch (AxisFault e) {
      e.printStackTrace();
    } catch (XMLStreamException e) {
      e.printStackTrace();
    } catch (RemoteException e) {
View Full Code Here

Examples of org.apache.airavata.client.stub.interpretor.WorkflowInterpretorStub

 
  private void launchWorkflow(String experimentId, String workflowGraph, NameValue[] inputs,
      WorkflowContextHeaderBuilder builder) throws AiravataAPIInvocationException {
    try {
      builder.getWorkflowMonitoringContext().setExperimentId(experimentId);
      WorkflowInterpretorStub stub = new WorkflowInterpretorStub(getClient().getAiravataManager().getWorkflowInterpreterServiceURL().toString());
      stub._getServiceClient().addHeader(
          AXIOMUtil.stringToOM(XMLUtil.xmlElementToString(builder
              .getXml())));
      stub.launchWorkflow(workflowGraph, experimentId, inputs);
    } catch (AxisFault e) {
      e.printStackTrace();
    } catch (XMLStreamException e) {
      e.printStackTrace();
    } catch (RemoteException e) {
View Full Code Here

Examples of org.apache.airavata.client.stub.interpretor.WorkflowInterpretorStub

 
  private void launchWorkflow(String experimentId, String workflowGraph, NameValue[] inputs,
      WorkflowContextHeaderBuilder builder) throws AiravataAPIInvocationException {
    try {
      builder.getWorkflowMonitoringContext().setExperimentId(experimentId);
      WorkflowInterpretorStub stub = new WorkflowInterpretorStub(getClient().getAiravataManager().getWorkflowInterpreterServiceURL().toString());
      stub._getServiceClient().addHeader(
          AXIOMUtil.stringToOM(XMLUtil.xmlElementToString(builder
              .getXml())));
      stub.launchWorkflow(workflowGraph, experimentId, inputs);
    } catch (AxisFault e) {
      e.printStackTrace();
    } catch (XMLStreamException e) {
      e.printStackTrace();
    } catch (RemoteException e) {
View Full Code Here

Examples of org.apache.airavata.client.stub.interpretor.WorkflowInterpretorStub

 
  private void launchWorkflow(String experimentId, String workflowGraph, NameValue[] inputs,
      WorkflowContextHeaderBuilder builder) throws AiravataAPIInvocationException {
    try {
      builder.getWorkflowMonitoringContext().setExperimentId(experimentId);
      WorkflowInterpretorStub stub = new WorkflowInterpretorStub(getClient().getAiravataManager().getWorkflowInterpreterServiceURL().toString());
      OMElement wchOMElement = AXIOMUtil.stringToOM(XMLUtil.xmlElementToString(builder
          .getXml()));
      wchOMElement.addAttribute("submissionUser", builder.getSubmissionUser(), wchOMElement.getNamespace());
      stub._getServiceClient().addHeader(
          wchOMElement);
      stub.launchWorkflow(workflowGraph, experimentId, inputs);
    } catch (AxisFault e) {
      e.printStackTrace();
    } catch (XMLStreamException e) {
      e.printStackTrace();
    } catch (RemoteException e) {
View Full Code Here

Examples of org.apache.airavata.client.stub.interpretor.WorkflowInterpretorStub

 
  private void launchWorkflow(String experimentId, String workflowGraph, NameValue[] inputs,
      WorkflowContextHeaderBuilder builder) throws AiravataAPIInvocationException {
    try {
      builder.getWorkflowMonitoringContext().setExperimentId(experimentId);
      WorkflowInterpretorStub stub = new WorkflowInterpretorStub(getClient().getAiravataManager().getWorkflowInterpreterServiceURL().toString());
      OMElement wchOMElement = AXIOMUtil.stringToOM(XMLUtil.xmlElementToString(builder
          .getXml()));
      wchOMElement.addAttribute("submissionUser", builder.getSubmissionUser(), wchOMElement.getNamespace());
      stub._getServiceClient().addHeader(
          wchOMElement);
      stub.launchWorkflow(workflowGraph, experimentId, inputs);
    } catch (AxisFault e) {
      e.printStackTrace();
    } catch (XMLStreamException e) {
      e.printStackTrace();
    } catch (RemoteException e) {
View Full Code Here

Examples of org.apache.airavata.xbaya.interpretor.WorkflowInterpretorStub

  }
 
  public String runWorkflow(String topic, String user, String metadata, String workflowInstanceName, WorkflowContextHeaderBuilder builder) {
        String worflowoutput = null;
        try {
            WorkflowInterpretorStub stub = new WorkflowInterpretorStub(
                    getClientConfiguration().getXbayaServiceURL().toString());
            OMElement omElement = AXIOMUtil.stringToOM(XMLUtil.xmlElementToString(builder.getXml()));
            stub._getServiceClient().addHeader(omElement);
            worflowoutput = stub.launchWorkflow(workflow, topic,null);
            runPreWorkflowExecutionTasks(worflowoutput, user, metadata, workflowInstanceName);

        } catch (AxisFault e) {
    } catch (RemoteException e) {
//      log.fine(e.getMessage(), e);
View Full Code Here

Examples of org.apache.airavata.xbaya.interpretor.WorkflowInterpretorStub

  }

  private void launchWorkflow(final String topic, final NameValue[] inputs,
      final WorkflowContextHeaderBuilder builder) {
    try {
      WorkflowInterpretorStub stub = new WorkflowInterpretorStub(
          getClientConfiguration().getXbayaServiceURL()
              .toString());
      stub._getServiceClient().addHeader(
          AXIOMUtil.stringToOM(XMLUtil
              .xmlElementToString(builder.getXml())));
      stub.launchWorkflow(workflow, topic, inputs);
      //      log.info("Workflow output : " + worflowoutput);
    } catch (AxisFault e) {
      e.printStackTrace();
    } catch (XMLStreamException e) {
      e.printStackTrace();
View Full Code Here

Examples of org.apache.airavata.xbaya.interpretor.WorkflowInterpretorStub

                } catch (MonitorException e1) {
                    WorkflowInterpreterLaunchWindow.this.engine.getGUI().getErrorWindow().error(e1);
                }
                try {

                    WorkflowInterpretorStub stub = new WorkflowInterpretorStub(engine.getConfiguration()
                            .getWorkflowInterpreterURL().toString());
                    NameValue[] configurations = new NameValue[6];
                    configurations[0] = new NameValue();
                    configurations[0].setName(HeaderConstants.HEADER_ELEMENT_GFAC);
                    configurations[0].setValue(engine.getConfiguration().getGFacURL().toString());
                    configurations[1] = new NameValue();
                    configurations[1].setName(HeaderConstants.HEADER_ELEMENT_REGISTRY);
                    if (null == engine.getConfiguration().getRegistryURL()) {
                        configurations[1].setValue(XBayaConstants.REGISTRY_URL.toString());
                    } else {
                        configurations[1].setValue(engine.getConfiguration().getRegistryURL().toString());
                    }
                    configurations[2] = new NameValue();
                    configurations[2].setName(HeaderConstants.HEADER_ELEMENT_PROXYSERVER);
                    configurations[2].setValue(engine.getConfiguration().getMyProxyServer());

                    configurations[3] = new NameValue();
                    configurations[3].setName(HeaderConstants.HEADER_ELEMENT_BROKER);
                    configurations[3].setValue(engine.getConfiguration().getBrokerURL().toString());

                    configurations[4] = new NameValue();
                    configurations[4].setName(HeaderConstants.HEADER_ELEMENT_MSGBOX);
                    configurations[4].setValue(engine.getConfiguration().getMessageBoxURL().toString());

                    configurations[5] = new NameValue();
                    configurations[5].setName(HeaderConstants.HEADER_ELEMENT_DSC);
                    configurations[5].setValue(engine.getConfiguration().getDSCURL().toString());

                    NameValue[] inputNameVals = new NameValue[inputNodes.size()];
                    for (int i = 0; i < inputNodes.size(); i++) {
                        inputNameVals[i] = new NameValue();
                        InputNode inputNode = inputNodes.get(i);
                        String id = inputNode.getID();
                        String value = inputNode.getDefaultValue().toString();
                        inputNameVals[i].setName(id);
                        inputNameVals[i].setValue(value);
                    }
                    XBayaConfiguration configuration = engine.getConfiguration();
                    String myProxyUsername = configuration.getRegistryUserName();
                    String myProxyPass = configuration.getRegistryPassphrase();
                    //todo we need to add the workflowContext header in the message
                    WorkflowContextHeaderBuilder builder = new WorkflowContextHeaderBuilder(configuration.getBrokerURL().toASCIIString(),
                            configuration.getGFacURL().toASCIIString(),configuration.getRegistryURL().toASCIIString(),configuration.getTopic()
                            ,null,configuration.getMessageBoxURL().toASCIIString());
                    stub._getServiceClient().addHeader(AXIOMUtil.stringToOM(XMLUtil.xmlElementToString(builder.getXml())));
                    stub.launchWorkflow(workflow.toXMLText(), topicString,inputNameVals);
                    engine.getConfiguration().getJcrComponentRegistry().getRegistry().updateExperimentName(topicString, instanceNameFinal);
                } catch (Exception e) {
                    WorkflowInterpreterLaunchWindow.this.engine.getGUI().getErrorWindow().error(e);
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.