airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1238802 - /incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java
Date Tue, 31 Jan 2012 20:45:42 GMT
Author: lahiru
Date: Tue Jan 31 20:45:42 2012
New Revision: 1238802

URL: http://svn.apache.org/viewvc?rev=1238802&view=rev
Log:
fixing issues with forEach handling.

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=1238802&r1=1238801&r2=1238802&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
Tue Jan 31 20:45:42 2012
@@ -116,7 +116,8 @@ public class InterpreterUtil {
                     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();
+                         outputName = ((SystemDataPort)forEachInputNode.getInputPort(
+                        forEachInputNode.getOutputPorts().indexOf(inputPort.getEdge(0).getFromPort()))).getWSComponentPort().getName();
                     }
 					returnValForProvenance = workflowInvoker
 							.getOutput(outputName);
@@ -168,7 +169,8 @@ public class InterpreterUtil {
                 outputName = ((SystemDataPort) inputPort).getWSComponentPort().getName();
 
             } else if (inputPort instanceof WSPort) {
-                outputName = ((WSPort) inputPort).getComponentPort().getName();
+                outputName = ((SystemDataPort)fromNode.getInputPort(
+                        fromNode.getOutputPorts().indexOf(inputPort.getEdge(0).getFromPort()))).getWSComponentPort().getName();
             }
 			XmlElement msgElmt = XmlConstants.BUILDER
 					.parseFragmentFromString("<temp>"
@@ -199,6 +201,8 @@ public class InterpreterUtil {
 					outputVal = fromInvoker.getOutput(inputPort.getFromPort()
 							.getName());
 
+
+
 			} catch (Exception e) {
 				// if the value is still null look it up from the inputport name
 				// because the value is set to the input port name at some point
@@ -276,8 +280,8 @@ public class InterpreterUtil {
 						}
 					}
 				} else if (workflowInvoker instanceof WorkflowInvokerWrapperForGFacInvoker) {
-
-                    String outputName = forEachInputNode.getOutputPort(0).getName();
+                    String outputName = forEachInputNode.getOutputPort(0)
+							.getName();
 					returnValForProvenance = workflowInvoker
 							.getOutput(outputName);
 					org.xmlpull.v1.builder.XmlElement msgElmt = (org.xmlpull.v1.builder.XmlElement) returnValForProvenance;



Mime
View raw message