airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1356316 - in /incubator/airavata/trunk/modules: airavata-client/src/main/java/org/apache/airavata/client/airavata/AiravataClient.java gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java
Date Mon, 02 Jul 2012 16:01:51 GMT
Author: lahiru
Date: Mon Jul  2 16:01:47 2012
New Revision: 1356316

URL: http://svn.apache.org/viewvc?rev=1356316&view=rev
Log:
fixing issue with AiravataClient.

Modified:
    incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/AiravataClient.java
    incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java

Modified: incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/AiravataClient.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/AiravataClient.java?rev=1356316&r1=1356315&r2=1356316&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/AiravataClient.java
(original)
+++ incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/AiravataClient.java
Mon Jul  2 16:01:47 2012
@@ -697,7 +697,18 @@ public class AiravataClient implements A
 	public List<WorkflowInput> getWorkflowInputs(String workflowTemplateId) throws Exception{
 		try {
 			Workflow workflowTemplate = getWorkflow(workflowTemplateId);
-			return workflowTemplate.getWorkflowInputs();
+            List<WSComponentPort> inputs = getWSComponentPortInputs(workflowTemplate);
+	        List<InputNode> inputNodes = getInputNodes(workflowTemplate);
+			List<WorkflowInput> results=new ArrayList<WorkflowInput>();
+			for (InputNode port : inputNodes) {
+				Object value=null;
+				WSComponentPort wsComponentPort = getWSComponentPort(port.getName(), inputs);
+				if (wsComponentPort!=null){
+					value=wsComponentPort.getValue();
+				}
+				results.add(new WorkflowInput(port.getName(), port.getParameterType().getLocalPart(),
port.getDefaultValue(), value, !port.isVisibility()));
+			}
+			return results;
 		} catch (RegistryException e) {
 			// TODO Auto-generated catch block
 			e.printStackTrace();

Modified: incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java?rev=1356316&r1=1356315&r2=1356316&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java
(original)
+++ incubator/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/core/gfac/provider/impl/GramProvider.java
Mon Jul  2 16:01:47 2012
@@ -503,9 +503,16 @@ public class GramProvider extends Abstra
         } catch (IOException e) {
             e.printStackTrace();  //To change body of catch statement use File | Settings
| File Templates.
         }
-        for (int i = numberofLines - count; i < numberofLines; i++) {
-            buffer.append(strLine.get(i));
-            buffer.append("\n");
+        if (numberofLines > count) {
+             for (int i = numberofLines - count; i < numberofLines; i++) {
+                buffer.append(strLine.get(i));
+                buffer.append("\n");
+            }
+        }else{
+             for (int i = 0; i < numberofLines; i++) {
+                buffer.append(strLine.get(i));
+                buffer.append("\n");
+            }
         }
         try {
             in.close();



Mime
View raw message