airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1348955 - in /incubator/airavata/trunk/modules: airavata-client/src/main/java/org/apache/airavata/client/airavata/ distribution/src/main/assembly/ xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/
Date Mon, 11 Jun 2012 18:29:19 GMT
Author: samindaw
Date: Mon Jun 11 18:29:19 2012
New Revision: 1348955

URL: http://svn.apache.org/viewvc?rev=1348955&view=rev
Log:
branch patches applied to trunk

Modified:
    incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/AiravataClient.java
    incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/WorkflowInput.java
    incubator/airavata/trunk/modules/distribution/src/main/assembly/bin-assembly.xml
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/ApplicationDescriptionDialog.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=1348955&r1=1348954&r2=1348955&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 Jun 11 18:29:19 2012
@@ -357,20 +357,32 @@ public class AiravataClient {
 		return runWorkflow(topic, inputs, user, null);
 	}
 
-	public String runWorkflow(String topic, NameValue[] inputs, String user,
-			String metadata) throws Exception{
-		String worflowoutput = null;
-		try {
-			WorkflowInterpretorStub stub = new WorkflowInterpretorStub(
-					getClientConfiguration().getXbayaServiceURL().toString());
-            stub._getServiceClient().addHeader(AXIOMUtil.stringToOM(XMLUtil.xmlElementToString(builder.getXml())));
-			worflowoutput = stub.launchWorkflow(workflow, topic, inputs);
-			runPostWorkflowExecutionTasks(topic, user, metadata);
-//			log.info("Workflow output : " + worflowoutput);
-		} catch (RegistryException e) {
-//			log.fine(e.getMessage(), e);
-		}
-		return worflowoutput;
+	public String runWorkflow(final String topic, final NameValue[] inputs, final String user,
+			final String metadata) throws Exception{
+		new Thread(new Runnable() {
+			public void run() {
+				try {
+					WorkflowInterpretorStub stub = new WorkflowInterpretorStub(
+							getClientConfiguration().getXbayaServiceURL()
+									.toString());
+					stub._getServiceClient().addHeader(
+							AXIOMUtil.stringToOM(XMLUtil
+									.xmlElementToString(builder.getXml())));
+					stub.launchWorkflow(workflow, topic, inputs);
+					runPostWorkflowExecutionTasks(topic, user, metadata);
+					//			log.info("Workflow output : " + worflowoutput);
+				} catch (RegistryException e) {
+					//			log.fine(e.getMessage(), e);
+				} catch (AxisFault e) {
+					e.printStackTrace();
+				} catch (XMLStreamException e) {
+					e.printStackTrace();
+				} catch (RemoteException e) {
+					e.printStackTrace();
+				}
+			}
+		}).start();
+		return topic;
 	}
 
 	public List<WorkflowExecution> getWorkflowExecutionDataByUser(String user)
@@ -556,7 +568,7 @@ public class AiravataClient {
 			List<WSComponentPort> inputs = getWSComponentPortInputs(workflowTemplateId);
 			List<WorkflowInput> results=new ArrayList<WorkflowInput>();
 			for (WSComponentPort port : inputs) {
-				results.add(new WorkflowInput(port.getName(), port.getType().getLocalPart(), port.getDefaultValue(),
port.getValue()));
+				results.add(new WorkflowInput(port.getName(), port.getType().getLocalPart(), port.getDefaultValue(),
port.getValue(),port.isOptional()));
 			}
 			return results;
 		} catch (RegistryException e) {

Modified: incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/WorkflowInput.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/WorkflowInput.java?rev=1348955&r1=1348954&r2=1348955&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/WorkflowInput.java
(original)
+++ incubator/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/airavata/WorkflowInput.java
Mon Jun 11 18:29:19 2012
@@ -26,12 +26,14 @@ public class WorkflowInput {
 	private String type;
 	private Object defaultValue;
 	private Object value;
+	private boolean optional;
 	
-	public WorkflowInput(String name,String type,Object defaultValue,Object value) {
+	public WorkflowInput(String name,String type,Object defaultValue,Object value, boolean optional)
{
 		setName(name);
 		setType(type);
 		setDefaultValue(defaultValue);
 		setValue(value);
+		setOptional(optional);
 	}
 	
 	public String getName() {
@@ -65,4 +67,12 @@ public class WorkflowInput {
 	public void setValue(Object value) {
 		this.value = value;
 	}
+
+	public boolean isOptional() {
+		return optional;
+	}
+
+	public void setOptional(boolean optional) {
+		this.optional = optional;
+	}
 }

Modified: incubator/airavata/trunk/modules/distribution/src/main/assembly/bin-assembly.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/distribution/src/main/assembly/bin-assembly.xml?rev=1348955&r1=1348954&r2=1348955&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/distribution/src/main/assembly/bin-assembly.xml (original)
+++ incubator/airavata/trunk/modules/distribution/src/main/assembly/bin-assembly.xml Mon Jun
11 18:29:19 2012
@@ -190,7 +190,13 @@
                 <include>*.xwf</include>
             </includes>
         </fileSet>
-
+		<fileSet>
+            <directory>../../samples</directory>
+            <outputDirectory>samples</outputDirectory>
+            <includes>
+                <include>*.sh</include>
+            </includes>
+        </fileSet>
         <fileSet>
             <directory>src/main/resources/conf</directory>
             <outputDirectory>standalone-server/conf</outputDirectory>

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/ApplicationDescriptionDialog.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/ApplicationDescriptionDialog.java?rev=1348955&r1=1348954&r2=1348955&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/ApplicationDescriptionDialog.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/dialogs/descriptors/ApplicationDescriptionDialog.java
Mon Jun 11 18:29:19 2012
@@ -653,20 +653,24 @@ public class ApplicationDescriptionDialo
 
     public void setHostName(String hostName) {
         this.hostName = hostName;
-        HostDescription hostDescription;
-		try {
-			hostDescription = registry.getHostDescription(hostName);
-			if (hostDescription.getType() instanceof GlobusHostType){
-	        	getShellApplicationDescription().getType().changeType(GramApplicationDeploymentType.type);
-	        }else{
-	        	getShellApplicationDescription().getType().changeType(ApplicationDeploymentDescriptionType.type);
-	        }
-			btnHostAdvanceOptions.setVisible(hostDescription.getType() instanceof GlobusHostType);
-		} catch (RegistryException e) {
-			//not there - ouch
+        if (hostName!=null) {
+			HostDescription hostDescription;
+			try {
+				hostDescription = registry.getHostDescription(hostName);
+				if (hostDescription.getType() instanceof GlobusHostType) {
+					getShellApplicationDescription().getType().changeType(
+							GramApplicationDeploymentType.type);
+				} else {
+					getShellApplicationDescription().getType().changeType(
+							ApplicationDeploymentDescriptionType.type);
+				}
+				btnHostAdvanceOptions
+						.setVisible(hostDescription.getType() instanceof GlobusHostType);
+			} catch (RegistryException e) {
+				//not there - ouch
+			}
 		}
-        
-        updateDialogStatus();
+		updateDialogStatus();
     }
 
     private void updateServiceName() {



Mime
View raw message