You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2013/03/22 16:32:55 UTC

svn commit: r1459847 - /airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java

Author: lahiru
Date: Fri Mar 22 15:32:55 2013
New Revision: 1459847

URL: http://svn.apache.org/r1459847
Log:
fixing integration tests.

Modified:
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java

Modified: airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java?rev=1459847&r1=1459846&r2=1459847&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java (original)
+++ airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/invoker/EmbeddedGFacInvoker.java Fri Mar 22 15:32:55 2013
@@ -78,6 +78,7 @@ import org.apache.airavata.schemas.gfac.
 import org.apache.airavata.schemas.gfac.URIArrayType;
 import org.apache.airavata.schemas.gfac.URIParameterType;
 import org.apache.airavata.schemas.gfac.UnicoreHostType;
+import org.apache.airavata.schemas.wec.ContextHeaderDocument;
 import org.apache.airavata.workflow.model.exceptions.WorkflowException;
 import org.apache.airavata.xbaya.XBayaConfiguration;
 import org.apache.airavata.xbaya.jython.lib.ServiceNotifiable;
@@ -279,12 +280,16 @@ public class EmbeddedGFacInvoker impleme
      */
     public synchronized boolean invoke() throws WorkflowException {
         try {
-            String hostName = this.configuration.getContextHeader().getSoaServiceEprs().getHostDescriptor();
+            ContextHeaderDocument.ContextHeader contextHeader = this.configuration.getContextHeader();
+            String hostName = null;
+            if(contextHeader != null){
+                hostName = contextHeader.getSoaServiceEprs().getHostDescriptor();
+            }
             //todo This is the basic scheduling, have to do proper scheduling implementation
             ServiceDescription serviceDescription = airavataAPI.getApplicationManager().getServiceDescription(serviceName);
             HostDescription registeredHost = getRegisteredHost(airavataAPI, this.serviceName);
             // if user specify a host, no matter what we pick that host for all the nodes, todo: allow users to specifi node specific host
-            if(hostName != null || hostName.isEmpty()) {
+            if(hostName != null) {
                 registeredHost = airavataAPI.getApplicationManager().getHostDescription(hostName);
             }
             ApplicationDescription applicationDescription = airavataAPI.getApplicationManager().getApplicationDescription(serviceName, registeredHost.getType().getHostName());