You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ra...@apache.org on 2013/04/17 22:58:59 UTC
svn commit: r1469070 - in
/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya:
interpretor/WorkflowInterpreter.java invoker/EmbeddedGFacInvoker.java
Author: raminder
Date: Wed Apr 17 20:58:59 2013
New Revision: 1469070
URL: http://svn.apache.org/r1469070
Log:
fixed passing of context header and reading node settings to set application configurations. AIRAVATA-824
Modified:
airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
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/interpretor/WorkflowInterpreter.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java?rev=1469070&r1=1469069&r2=1469070&view=diff
==============================================================================
--- airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java (original)
+++ airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java Wed Apr 17 20:58:59 2013
@@ -25,6 +25,7 @@ import org.apache.airavata.client.api.Ai
import org.apache.airavata.common.utils.Pair;
import org.apache.airavata.common.utils.WSDLUtil;
import org.apache.airavata.common.utils.XMLUtil;
+import org.apache.airavata.common.workflow.execution.context.WorkflowContextHeaderBuilder;
import org.apache.airavata.gfac.context.security.AmazonSecurityContext;
import org.apache.airavata.registry.api.workflow.WorkflowExecution;
import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
@@ -160,6 +161,8 @@ public class WorkflowInterpreter {
this.getConfig().getConfiguration().getAiravataAPI().getProvenanceManager().setWorkflowNodeType(workflowInstanceNode, workflowNodeType);
}
this.config.getNotifier().workflowStarted(values, keywords);
+ this.config.getConfiguration().setContextHeader(WorkflowContextHeaderBuilder.getCurrentContextHeader());
+
while (this.getWorkflow().getExecutionState() != WorkflowExecutionState.STOPPED) {
if (getRemainNodesDynamically() == 0) {
notifyViaInteractor(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED, WorkflowExecutionState.PAUSED);
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=1469070&r1=1469069&r2=1469070&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 Wed Apr 17 20:58:59 2013
@@ -280,12 +280,12 @@ public class EmbeddedGFacInvoker impleme
*/
public synchronized boolean invoke() throws WorkflowException {
try {
- 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
+ ContextHeaderDocument.ContextHeader contextHeader = WorkflowContextHeaderBuilder.removeOtherSchedulingConfig(nodeID,this.configuration.getContextHeader());
+ String hostName = null;
+ if(contextHeader != null){
+ hostName = contextHeader.getWorkflowSchedulingContext().getApplicationSchedulingContextArray(0).getHostName();
+ }
+ //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