airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From patanac...@apache.org
Subject svn commit: r1163053 - in /incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya: graph/dynamic/gui/DynamicWorkflowRunnerWindow.java interpretor/WorkflowInterpreter.java invoker/GenericInvoker.java
Date Mon, 29 Aug 2011 23:48:01 GMT
Author: patanachai
Date: Mon Aug 29 23:48:01 2011
New Revision: 1163053

URL: http://svn.apache.org/viewvc?rev=1163053&view=rev
Log:
Remove remote invocation in DynamicWorkflowRunner and add notification

Modified:
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/graph/dynamic/gui/DynamicWorkflowRunnerWindow.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GenericInvoker.java

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/graph/dynamic/gui/DynamicWorkflowRunnerWindow.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/graph/dynamic/gui/DynamicWorkflowRunnerWindow.java?rev=1163053&r1=1163052&r2=1163053&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/graph/dynamic/gui/DynamicWorkflowRunnerWindow.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/graph/dynamic/gui/DynamicWorkflowRunnerWindow.java
Mon Aug 29 23:48:01 2011
@@ -54,10 +54,7 @@ import org.apache.airavata.xbaya.gui.XBa
 import org.apache.airavata.xbaya.gui.XBayaDialog;
 import org.apache.airavata.xbaya.gui.XBayaLabel;
 import org.apache.airavata.xbaya.gui.XBayaTextField;
-import org.apache.airavata.xbaya.interpretor.HeaderConstants;
 import org.apache.airavata.xbaya.interpretor.WorkflowInterpreter;
-import org.apache.airavata.xbaya.interpretor.WorkflowInterpretorStub;
-import org.apache.airavata.xbaya.interpretor.WorkflowInterpretorStub.NameValue;
 import org.apache.airavata.xbaya.jython.script.JythonScript;
 import org.apache.airavata.xbaya.monitor.MonitorConfiguration;
 import org.apache.airavata.xbaya.monitor.MonitorException;
@@ -369,100 +366,29 @@ public class DynamicWorkflowRunnerWindow
             @Override
             public void run() {
 
-                boolean remote = false;
+                WorkflowInterpreter workflowInterpreter = new WorkflowInterpreter(
+                        DynamicWorkflowRunnerWindow.this.engine, topicString);
+                try {
+                    MonitorConfiguration notifConfig = DynamicWorkflowRunnerWindow.this.engine.getMonitor()
+                            .getConfiguration();
+                    notifConfig.setTopic(topicString);
+                    DynamicWorkflowRunnerWindow.this.engine.getMonitor().start();
 
-                if (remote) {
+                    DynamicWorkflowRunnerWindow.this.engine.getGUI().addDynamicExecutionToolsToToolbar();
 
-                    try {
-                        DynamicWorkflowRunnerWindow.this.engine.getMonitor().getConfiguration().setTopic(topicString);
+                    if (resourceMapping != null)
+                        workflowInterpreter.setResourceMapping(resourceMapping);
 
-                        DynamicWorkflowRunnerWindow.this.engine.getMonitor().start();
+                    workflowInterpreter.scheduleDynamically();
+                } catch (XBayaException e) {
+                    try {
+                        workflowInterpreter.cleanup();
                     } 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 {
-
-                    WorkflowInterpreter workflowInterpreter = new WorkflowInterpreter(
-                            DynamicWorkflowRunnerWindow.this.engine, topicString);
-                    try {
-                        //MonitorConfiguration notifConfig = DynamicWorkflowRunnerWindow.this.engine.getMonitor()
-                        //        .getConfiguration();
-                        //notifConfig.setTopic(topicString);
-                        //DynamicWorkflowRunnerWindow.this.engine.getMonitor().start();
-
-                        //DynamicWorkflowRunnerWindow.this.engine.getGUI().addDynamicExecutionToolsToToolbar();
-
-                        //if (resourceMapping != null)
-                        //    workflowInterpreter.setResourceMapping(resourceMapping);
-
-                        workflowInterpreter.scheduleDynamically();
-                    } catch (XBayaException e) {
-                        try {
-                            workflowInterpreter.cleanup();
-                        } catch (MonitorException e1) {
-                            DynamicWorkflowRunnerWindow.this.engine.getErrorWindow().error(e1);
-                        }
-                        DynamicWorkflowRunnerWindow.this.engine.getErrorWindow().error(e);
-                    }
-
+                    DynamicWorkflowRunnerWindow.this.engine.getErrorWindow().error(e);
                 }
+
             }
         }.start();
 

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java?rev=1163053&r1=1163052&r2=1163053&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
Mon Aug 29 23:48:01 2011
@@ -242,7 +242,7 @@ public class WorkflowInterpreter {
                 keywords[i] = ((InputNode) node).getConfiguredName();
                 values[i] = ((InputNode) node).getDefaultValue();
             }
-            //this.notifier.workflowStarted(values, keywords);
+            this.notifier.workflowStarted(values, keywords);
             while (this.workflow.getExecutionState() != XBayaExecutionState.STOPPED) {
                 if (getRemainNodesDynamically() == 0) {
                     if (this.mode == GUI_MODE) {

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GenericInvoker.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GenericInvoker.java?rev=1163053&r1=1163052&r2=1163053&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GenericInvoker.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/GenericInvoker.java
Mon Aug 29 23:48:01 2011
@@ -45,7 +45,6 @@ import org.apache.airavata.xbaya.lead.Le
 import org.apache.airavata.xbaya.util.XMLUtil;
 import org.xmlpull.v1.builder.XmlElement;
 
-import xsul.invoker.gsi.GsiInvoker;
 import xsul.lead.LeadContextHeader;
 import xsul.ws_addressing.WsaEndpointReference;
 import xsul.wsdl.WsdlDefinitions;
@@ -92,8 +91,6 @@ public class GenericInvoker implements I
 
     private WsdlDefinitions wsdlDefinitionObject;
 
-    private GsiInvoker secureInvokerFroRetrivingWSDL;
-
     /**
      * Creates an InvokerWithNotification.
      * 
@@ -335,7 +332,7 @@ public class GenericInvoker implements I
         try {
                 WSIFMessage inputMessage = this.invoker.getInputs();
             logger.finest("inputMessage: " + XMLUtil.xmlElementToString((XmlElement) inputMessage));
-            //this.notifier.invokingService(inputMessage);
+            this.notifier.invokingService(inputMessage);
 
             ExecutorService executor = Executors.newSingleThreadExecutor();
             this.result = executor.submit(new Callable<Boolean>() {



Mime
View raw message