airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1237387 - /incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java
Date Sun, 29 Jan 2012 17:42:55 GMT
Author: lahiru
Date: Sun Jan 29 17:42:55 2012
New Revision: 1237387

URL: http://svn.apache.org/viewvc?rev=1237387&view=rev
Log:
fixing an issue with foreache.

Modified:
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java?rev=1237387&r1=1237386&r2=1237387&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java
Sun Jan 29 17:42:55 2012
@@ -26,6 +26,7 @@ import org.apache.airavata.xbaya.graph.D
 import org.apache.airavata.xbaya.graph.Node;
 import org.apache.airavata.xbaya.graph.amazon.InstanceNode;
 import org.apache.airavata.xbaya.graph.system.*;
+import org.apache.airavata.xbaya.graph.ws.WSPort;
 import org.apache.airavata.xbaya.interpretor.SystemComponentInvoker;
 import org.apache.airavata.xbaya.interpretor.WorkFlowInterpreterException;
 import org.apache.airavata.xbaya.invoker.GenericInvoker;
@@ -111,7 +112,12 @@ public class InterpreterUtil {
 					}
 				} else if (workflowInvoker instanceof SystemComponentInvoker) {
                     int index = forEachInputNode.getOutputPorts().indexOf(inputPort.getEdge(0).getFromPort());
-                    String outputName = ((SystemDataPort)forEachInputNode.getInputPort(index)).getWSComponentPort().getName();
+                    String outputName = "";
+                    if(forEachInputNode.getInputPort(index) instanceof SystemDataPort){
+                       outputName = ((SystemDataPort)forEachInputNode.getInputPort(index)).getWSComponentPort().getName();
+                    }else if(forEachInputNode.getInputPort(index) instanceof WSPort){
+                        outputName = ((WSPort)forEachInputNode.getInputPort(index)).getComponentPort().getName();
+                    }
 					returnValForProvenance = workflowInvoker
 							.getOutput(outputName);
 					XmlElement msgElmt = XmlConstants.BUILDER
@@ -286,7 +292,12 @@ public class InterpreterUtil {
                         inputNumbers[inputPorts.indexOf(forEachInputPort)] = index;
 				} else if (workflowInvoker instanceof SystemComponentInvoker) {
 				    int portIndex = forEachInputNode.getOutputPorts().indexOf(forEachInputPort.getEdge(0).getFromPort());
-                    String outputName = ((SystemDataPort)forEachInputNode.getInputPort(portIndex)).getWSComponentPort().getName();
+                    String outputName = "";
+                    if(forEachInputNode.getInputPort(portIndex) instanceof SystemDataPort){
+                       outputName = ((SystemDataPort)forEachInputNode.getInputPort(portIndex)).getWSComponentPort().getName();
+                    }else if(forEachInputNode.getInputPort(portIndex) instanceof WSPort){
+                        outputName = ((WSPort)forEachInputNode.getInputPort(portIndex)).getComponentPort().getName();
+                    }
 					returnValForProvenance = workflowInvoker
 							.getOutput(outputName);
 					XmlElement msgElmt = XmlConstants.BUILDER



Mime
View raw message