Examples of MonitorConfiguration


Examples of edu.indiana.extreme.xbaya.monitor.MonitorConfiguration

                this.invokingDialog.hide();
            }
            return;
        }

        MonitorConfiguration monitorConfiguration = this.engine.getMonitor()
                .getConfiguration();
        XBayaConfiguration xbayaConfiguration = this.engine.getConfiguration();
        WsdlDefinitions wsdl;
        try {
            GcInstance instance = client.instantiate(workflow,
                    xbayaConfiguration.getDSCURL(), monitorConfiguration
                            .getTopic());
            wsdl = client.start(instance);
        } catch (WorkflowEngineException e) {
            if (this.canceled) {
                logger.caught(e);
            } else {               
                this.engine.getErrorWindow().error(ErrorMessages.GPEL_ERROR, e);
                this.invokingDialog.hide();
            }
            return;
        } catch (ComponentException e) {
            if (this.canceled) {
                logger.caught(e);
            } else {               
                this.engine.getErrorWindow().error(ErrorMessages.GPEL_ERROR, e);
                this.invokingDialog.hide();
            }
            return;
        } catch (GraphException e) {
            if (this.canceled) {
                logger.caught(e);
            } else {               
                this.engine.getErrorWindow().error(ErrorMessages.GPEL_ERROR, e);
                this.invokingDialog.hide();
            }
            return;
        } catch (RuntimeException e) {
            if (this.canceled) {
                logger.caught(e);
            } else {               
                this.engine.getErrorWindow().error(
                        ErrorMessages.UNEXPECTED_ERROR, e);
                this.invokingDialog.hide();
            }
            return;
        } catch (Error e) {           
            this.engine.getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR,
                    e);
            this.invokingDialog.hide();
            return;
        }

        // Create the invoker
        LEADWorkflowInvoker invoker = null;
        try {
            LeadContextHeaderHelper leadContextHelper = new LeadContextHeaderHelper();
            leadContextHelper.setXBayaConfiguration(xbayaConfiguration);
            leadContextHelper.setMyLeadConfiguration(this.engine.getMyLead()
                    .getConfiguration());
            leadContextHelper.setWorkflow(workflow);
            leadContextHelper.setMonitorConfiguration(monitorConfiguration);

            LeadContextHeader leadContext = leadContextHelper
                    .getLeadContextHeader();

            URI messageBoxURL = null;
            if (monitorConfiguration.isPullMode()) {
                messageBoxURL = monitorConfiguration.getMessageBoxURL();
            }

            // create an invoker with LEAD Context
            GsiInvoker secureInvoker = null;
            if (this.engine.getWorkflowClient().isSecure()) {
View Full Code Here

Examples of edu.indiana.extreme.xbaya.monitor.MonitorConfiguration

    this.configuration = configuration;
    this.engine = this;
   
    // Creates some essential objects.

    MonitorConfiguration monitorConfiguration = new MonitorConfiguration(
        configuration.getBrokerURL(), configuration.getTopic(),
        configuration.isPullMode(), configuration.getMessageBoxURL());
    this.monitor = new Monitor(monitorConfiguration);

    // MyProxy
View Full Code Here

Examples of edu.indiana.extreme.xbaya.monitor.MonitorConfiguration

    this.workflow = this.engine.getWorkflow();

    this.script = new ScuflScript(this.workflow,
        this.engine.getConfiguration());

    MonitorConfiguration notifConfig = this.engine.getMonitor()
        .getConfiguration();
    if (notifConfig.getBrokerURL() == null) {
      this.engine.getErrorWindow().error(
          ErrorMessages.BROKER_URL_NOT_SET_ERROR);
      return;
    }

    // Check if the workflow is valid before the user types in input
    // values.
    JythonScript jythonScript = new JythonScript(this.workflow,
        this.engine.getConfiguration());
    ArrayList<String> warnings = new ArrayList<String>();
    if (!jythonScript.validate(warnings)) {
      StringBuilder buf = new StringBuilder();
      for (String warning : warnings) {
        buf.append("- ");
        buf.append(warning);
        buf.append("\n");
      }
      this.engine.getErrorWindow().warning(buf.toString());
      return;
    }

    // Create a script here. It might throw some exception because the
    // validation is not perfect.
    try {
      this.script.create();
    } catch (GraphException e) {
      this.engine.getErrorWindow().error(
          ErrorMessages.GRAPH_NOT_READY_ERROR, e);
      hide();
      return;
    } catch (RuntimeException e) {
      this.engine.getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR,
          e);
      hide();
      return;
    } catch (Error e) {
      this.engine.getErrorWindow().error(ErrorMessages.UNEXPECTED_ERROR,
          e);
      hide();
      return;
    }

    // Create input fields
    Collection<InputNode> inputNodes = GraphUtil
        .getInputNodes(this.workflow.getGraph());
    for (InputNode node : inputNodes) {
      String id = node.getID();
      QName parameterType = node.getParameterType();
      JLabel nameLabel = new JLabel(id);
      JLabel typeField = new JLabel(parameterType.getLocalPart());
      XBayaTextField paramField = new XBayaTextField();
      Object value = node.getDefaultValue();

      String valueString;
      if (value == null) {
        valueString = "";
      } else {
        if (value instanceof XmlElement) {
          XmlElement valueElement = (XmlElement) value;
          valueString = XMLUtil.xmlElementToString(valueElement);
        } else {
          // Only string comes here for now.
          valueString = value.toString();
        }
      }
      paramField.setText(valueString);
      this.parameterPanel.add(nameLabel);
      this.parameterPanel.add(typeField);
      this.parameterPanel.add(paramField);
      this.parameterTextFields.add(paramField);
    }
    this.parameterPanel.layout(inputNodes.size(), 3, GridPanel.WEIGHT_NONE,
        2);

    this.topicTextField.setText(notifConfig.getTopic());

    XBayaConfiguration config = this.engine.getConfiguration();

    this.dialog.show();
  }
View Full Code Here

Examples of edu.indiana.extreme.xbaya.monitor.MonitorConfiguration

    // find it.
    URI workfowInstanceID = URI.create(StringUtil
        .convertToJavaIdentifier(topic));
    this.workflow.setGPELInstanceID(workfowInstanceID);

    MonitorConfiguration notifConfig = this.engine.getMonitor()
        .getConfiguration();
    notifConfig.setTopic(topic);
    arguments.add("-" + JythonScript.TOPIC_VARIABLE);
    arguments.add(topic);

    // TODO error check for user inputs

    List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow
        .getGraph());
    final org.xmlpull.v1.builder.XmlElement inputs = builder
        .newFragment("inputs");
    for (int i = 0; i < inputNodes.size(); i++) {
      InputNode inputNode = inputNodes.get(i);
      XBayaTextField parameterTextField = this.parameterTextFields.get(i);
      String id = inputNode.getID();
      String value = parameterTextField.getText();
      org.xmlpull.v1.builder.XmlElement input = inputs.addElement(id);
      input.addChild(value);
    }

    final String scriptString = this.script.getScript();
    final String topicString = topic;
    new Thread() {
      /**
       * @see java.lang.Thread#run()
       */
      @Override
      public void run() {
        try {
          MonitorConfiguration notifConfig = TavernaRunnerWindow.this.engine
              .getMonitor().getConfiguration();
          TavernaRunnerWindow.this.engine.getMonitor().start();
          notifConfig.setTopic(topicString);
          TavernaRunnerWindow.this.engine.getGUI()
              .addDynamicExecutionToolsToToolbar();
          new WorkflowInterpreter(TavernaRunnerWindow.this.engine,
              topicString).scheduleDynamically();
        } catch (XBayaException e) {
View Full Code Here

Examples of edu.indiana.extreme.xbaya.monitor.MonitorConfiguration

     */
    public void show() {
        this.workflow = this.engine.getWorkflow();
       

        MonitorConfiguration notifConfig = this.engine.getMonitor()
                .getConfiguration();
        if (notifConfig.getBrokerURL() == null) {
            this.engine.getErrorWindow().error(
                    ErrorMessages.BROKER_URL_NOT_SET_ERROR);
            return;
        }


        // Create input fields
        Collection<InputNode> inputNodes = GraphUtil
                .getInputNodes(this.workflow.getGraph());
        for (InputNode node : inputNodes) {
            String id = node.getID();
            QName parameterType = node.getParameterType();
            JLabel nameLabel = new JLabel(id);
            JLabel typeField = new JLabel(parameterType.getLocalPart());
            XBayaTextField paramField = new XBayaTextField();
            Object value = node.getDefaultValue();

            String valueString;
            if (value == null) {
                valueString = "";
            } else {
                if (value instanceof XmlElement) {
                    XmlElement valueElement = (XmlElement) value;
                    valueString = XMLUtil.xmlElementToString(valueElement);
                } else {
                    // Only string comes here for now.
                    valueString = value.toString();
                }
            }
            paramField.setText(valueString);
            this.parameterPanel.add(nameLabel);
            this.parameterPanel.add(typeField);
            this.parameterPanel.add(paramField);
            this.parameterTextFields.add(paramField);
        }
        this.parameterPanel.layout(inputNodes.size(), 3, GridPanel.WEIGHT_NONE,
                2);

        this.topicTextField.setText(notifConfig.getTopic());

        XBayaConfiguration config = this.engine.getConfiguration();
        this.gfacTextField.setText(config.getGFacURL().toString());
        URI registryURL = config.getXRegistryURL();
        if(null != registryURL){
View Full Code Here

Examples of edu.indiana.extreme.xbaya.monitor.MonitorConfiguration

        // find it.
        URI workfowInstanceID = URI.create(StringUtil
                .convertToJavaIdentifier(topic));
        this.workflow.setGPELInstanceID(workfowInstanceID);

        MonitorConfiguration notifConfig = this.engine.getMonitor()
                .getConfiguration();
        notifConfig.setTopic(topic);
        arguments.add("-" + JythonScript.TOPIC_VARIABLE);
        arguments.add(topic);

        // TODO error check for user inputs

        List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow
                .getGraph());
        final org.xmlpull.v1.builder.XmlElement inputs = builder.newFragment("inputs");
        for (int i = 0; i < inputNodes.size(); i++) {
            InputNode inputNode = inputNodes.get(i);
            XBayaTextField parameterTextField = this.parameterTextFields.get(i);
            String id = inputNode.getID();
            String value = parameterTextField.getText();
            org.xmlpull.v1.builder.XmlElement input = inputs.addElement(id);
            input.addChild(value);
        }
        
       
        final String xregistryUrl = this.xRegistryTextField.getText();
        if( null != xregistryUrl && !"".equals(xregistryUrl)){
          try {
        this.engine.getConfiguration().setXRegistryURL(new URI(xregistryUrl));
      } catch (URISyntaxException e) {
        this.engine.getErrorWindow().error(e);
      }
        }
       
        final String gFacUrl = this.gfacTextField.getText();
        if( null != gFacUrl && !"".equals(gFacUrl)){
          try {
        this.engine.getConfiguration().setGFacURL(new URI(gFacUrl));
      } catch (URISyntaxException e) {
        this.engine.getErrorWindow().error(e);
      }
        }
       
       
       
       
       
        final String topicString = topic;
        new Thread() {
        /**
         * @see java.lang.Thread#run()
         */
        @Override
        public void run() {
          try {
            MonitorConfiguration notifConfig = DynamicWorkflowRunnerWindow.this.engine.getMonitor()
                    .getConfiguration();
            DynamicWorkflowRunnerWindow.this.engine.getMonitor().start();
            notifConfig.setTopic(topicString);
            DynamicWorkflowRunnerWindow.this.engine.getGUI().addDynamicExecutionToolsToToolbar();
            new WorkflowInterpreter(DynamicWorkflowRunnerWindow.this.engine).scheduleDynamically(topicString);           
          } catch (XBayaException e) {
            DynamicWorkflowRunnerWindow.this.engine.getErrorWindow().error(e);
          }
View Full Code Here

Examples of org.apache.airavata.ws.monitor.MonitorConfiguration

     * Shows the dialog.
     */
    public void show() {
        this.workflow = this.engine.getGUI().getWorkflow();

        MonitorConfiguration notifConfig = this.engine.getMonitor().getConfiguration();
        if (notifConfig.getBrokerURL() == null) {
            this.engine.getGUI().getErrorWindow().error(ErrorMessages.BROKER_URL_NOT_SET_ERROR);
            return;
        }

        // Create input fields
View Full Code Here

Examples of org.apache.airavata.ws.monitor.MonitorConfiguration

        // Use topic as a base of workflow instance ID so that the monitor can
        // find it.
        URI workfowInstanceID = URI.create(StringUtil.convertToJavaIdentifier(topic));
        this.workflow.setGPELInstanceID(workfowInstanceID);

        MonitorConfiguration notifConfig = this.engine.getMonitor().getConfiguration();
        notifConfig.setTopic(topic);
        arguments.add("-" + JythonScript.TOPIC_VARIABLE);
        arguments.add(topic);
        Collection<WSNode> wsNodes = GraphUtil.getWSNodes(this.engine.getGUI().getWorkflow().getGraph());
        for (WSNode node : wsNodes) {
            ((WSNodeGUI) NodeController.getGUI(node)).setInteractiveMode(false);
View Full Code Here

Examples of org.apache.airavata.ws.monitor.MonitorConfiguration

//            if (XBayaUtil.isURLExists(gfacUrl + "?wsdl")) {
//                this.gfacUrlListField.addItem(gfacUrl);
//            }
//        }
//        this.gfacUrlListField.setEditable(true);
        MonitorConfiguration notifConfig = this.engine.getMonitor().getConfiguration();
        if (notifConfig.getBrokerURL() == null) {
            this.engine.getGUI().getErrorWindow().error(ErrorMessages.BROKER_URL_NOT_SET_ERROR);
            return;
        }

        // Create input fields
View Full Code Here

Examples of org.apache.airavata.ws.monitor.MonitorConfiguration

        // Use topic as a base of workflow instance ID so that the monitor can
        // find it.
        URI workfowInstanceID = URI.create(StringUtil.convertToJavaIdentifier(topic));
        this.workflow.setGPELInstanceID(workfowInstanceID);

        MonitorConfiguration notifConfig = this.engine.getMonitor().getConfiguration();
        notifConfig.setTopic(topic);
        arguments.add("-" + JythonScript.TOPIC_VARIABLE);
        arguments.add(topic);
        Collection<WSNode> wsNodes = GraphUtil.getWSNodes(this.engine.getGUI().getWorkflow().getGraph());
        // This is to enable service interaction with the back end
        if (this.interactChkBox.isSelected()) {
            LinkedList<String> nodeIDs = new LinkedList<String>();
            for (WSNode node : wsNodes) {
                nodeIDs.add(node.getID());
                ((WSNodeGUI) NodeController.getGUI(node)).setInteractiveMode(true);
            }
            notifConfig.setInteractiveNodeIDs(nodeIDs);
        } else {
            for (WSNode node : wsNodes) {
                ((WSNodeGUI) NodeController.getGUI(node)).setInteractiveMode(false);
            }
        }

        final boolean isRunCrossProduct=chkRunWithCrossProduct.isSelected();
        // TODO error check for user inputs

        final List<InputNode> inputNodes = GraphUtil.getInputNodes(this.workflow.getGraph());
        builder.newFragment("inputs");
        new ODEClient();
        for (int i = 0; i < inputNodes.size(); i++) {
            InputNode inputNode = inputNodes.get(i);
            XBayaTextField parameterTextField = this.parameterTextFields.get(i);
            inputNode.getID();
            String value = parameterTextField.getText();
            inputNode.setDefaultValue(value);
        }

//        final String gFacUrl = ((URI) this.gfacUrlListField.getSelectedItem()).toASCIIString();
//        if (null != gFacUrl && !"".equals(gFacUrl)) {
//            try {
//                this.engine.getConfiguration().setGFacURL(new URI(gFacUrl));
//            } catch (URISyntaxException e) {
//                this.engine.getGUI().getErrorWindow().error(e);
//            }
//        }
        this.engine.getConfiguration().setTopic(topic);

        /*
         * Load host description from xregistry and add to interpreter
         */
        LeadResourceMapping mapping = null;
       
        final LeadResourceMapping resourceMapping = mapping;
        final String topicString = topic;
        new Thread() {
            /**
             * @see java.lang.Thread#run()
             */
            @Override
            public void run() {
                XBayaConfiguration conf = DynamicWorkflowRunnerWindow.this.engine.getConfiguration();
                WorkflowInterpreterConfiguration workflowInterpreterConfiguration = new WorkflowInterpreterConfiguration(engine.getGUI().getWorkflow(),topicString,conf.getMessageBoxURL(), conf.getBrokerURL(), conf.getAiravataAPI(), conf, DynamicWorkflowRunnerWindow.this.engine.getGUI(), DynamicWorkflowRunnerWindow.this.engine.getMonitor());
                workflowInterpreterConfiguration.setRunWithCrossProduct(isRunCrossProduct);

                WorkflowInterpreter workflowInterpreter = new WorkflowInterpreter(
                    workflowInterpreterConfiguration, new GUIWorkflowInterpreterInteractorImpl(engine, engine.getGUI().getWorkflow()));
                DynamicWorkflowRunnerWindow.this.engine.registerWorkflowInterpreter(workflowInterpreter);
                try {
                    MonitorConfiguration notifConfig = DynamicWorkflowRunnerWindow.this.engine.getMonitor()
                            .getConfiguration();
                    notifConfig.setTopic(topicString);
                    DynamicWorkflowRunnerWindow.this.engine.getMonitor().start();

                    if (resourceMapping != null)
                        workflowInterpreter.setResourceMapping(resourceMapping);

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.