Author: samindaw
Date: Thu Aug 15 21:44:48 2013
New Revision: 1514509
URL: http://svn.apache.org/r1514509
Log:
https://issues.apache.org/jira/browse/AIRAVATA-820 - fixing foreach issue
Modified:
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java
airavata/trunk/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml
airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
Modified:
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java
URL:
http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java?rev=1514509&r1=1514508&r2=1514509&view=diff
==============================================================================
---
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java
(original)
+++
airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/impl/ExecutionManagerImpl.java
Thu Aug 15 21:44:48 2013
@@ -47,9 +47,6 @@ import org.apache.airavata.registry.api.
import org.apache.airavata.registry.api.workflow.WorkflowExecutionError;
import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus;
import org.apache.airavata.registry.api.workflow.WorkflowExecutionStatus.State;
-import org.apache.airavata.workflow.model.component.ComponentException;
-import org.apache.airavata.workflow.model.component.ws.WSComponentPort;
-import org.apache.airavata.workflow.model.graph.GraphException;
import org.apache.airavata.workflow.model.wf.Workflow;
import org.apache.airavata.workflow.model.wf.WorkflowInput;
import org.apache.airavata.ws.monitor.EventData;
@@ -185,26 +182,32 @@ public class ExecutionManagerImpl implem
}
private String runExperimentGeneral(Workflow workflowObj,
List<WorkflowInput> inputs, ExperimentAdvanceOptions options, EventDataListener
listener) throws AiravataAPIInvocationException {
try {
- String workflowString =
XMLUtil.xmlElementToString(workflowObj.toXML());
- List<WSComponentPort> ports =
getWSComponentPortInputs(workflowObj);
- for (WorkflowInput input : inputs) {
- WSComponentPort port =
getWSComponentPort(input.getName(),
- ports);
- if (port != null) {
- port.setValue(input.getValue());
- }
- }
List<NameValue> inputValues = new
ArrayList<NameValue>();
- for (WSComponentPort port : ports) {
+ for (WorkflowInput input : inputs) {
NameValue nameValue = new NameValue();
- nameValue.setName(port.getName());
- if (port.getValue() == null) {
-
nameValue.setValue(port.getDefaultValue());
- } else {
-
nameValue.setValue(port.getValue().toString());
- }
+ nameValue.setName(input.getName());
+
nameValue.setValue(String.valueOf(input.getValue()==null?input.getDefaultValue():input.getValue()));
inputValues.add(nameValue);
}
+ String workflowString =
XMLUtil.xmlElementToString(workflowObj.toXML());
+// List<WSComponentPort> ports =
getWSComponentPortInputs(workflowObj);
+// for (WorkflowInput input : inputs) {
+// WSComponentPort port =
getWSComponentPort(input.getName(),
+// ports);
+// if (port != null) {
+// port.setValue(input.getValue());
+// }
+// }
+// for (WSComponentPort port : ports) {
+// NameValue nameValue = new NameValue();
+// nameValue.setName(port.getName());
+// if (port.getValue() == null) {
+//
nameValue.setValue(port.getDefaultValue());
+// } else {
+//
nameValue.setValue(port.getValue().toString());
+// }
+// inputValues.add(nameValue);
+// }
String experimentID=options.getCustomExperimentId();
String workflowTemplateName = workflowObj.getName();
if (experimentID == null || experimentID.isEmpty()) {
@@ -226,10 +229,10 @@ public class ExecutionManagerImpl implem
}
launchWorkflow(experimentID, workflowString, inputVals,
builder);
return experimentID;
- } catch (GraphException e) {
- throw new AiravataAPIInvocationException(e);
- } catch (ComponentException e) {
- throw new AiravataAPIInvocationException(e);
+// } catch (GraphException e) {
+// throw new AiravataAPIInvocationException(e);
+// } catch (ComponentException e) {
+// throw new AiravataAPIInvocationException(e);
} catch (Exception e) {
throw new AiravataAPIInvocationException("Error working with
Airavata Registry: " + e.getLocalizedMessage(), e);
}
@@ -250,22 +253,22 @@ public class ExecutionManagerImpl implem
return workflowObj;
}
- private List<WSComponentPort> getWSComponentPortInputs(Workflow
workflow)
- throws GraphException, ComponentException {
- workflow.createScript();
- List<WSComponentPort> inputs = workflow.getInputs();
- return inputs;
- }
-
- private WSComponentPort getWSComponentPort(String name,
- List<WSComponentPort> ports) {
- for (WSComponentPort port : ports) {
- if (port.getName().equals(name)) {
- return port;
- }
- }
- return null;
- }
+// private List<WSComponentPort> getWSComponentPortInputs(Workflow
workflow)
+// throws GraphException, ComponentException {
+// workflow.createScript();
+// List<WSComponentPort> inputs = workflow.getInputs();
+// return inputs;
+// }
+//
+// private WSComponentPort getWSComponentPort(String name,
+// List<WSComponentPort> ports) {
+// for (WSComponentPort port : ports) {
+// if (port.getName().equals(name)) {
+// return port;
+// }
+// }
+// return null;
+// }
private void launchWorkflow(String experimentId, String workflowGraph,
NameValue[] inputs,
WorkflowContextHeaderBuilder builder) throws
AiravataAPIInvocationException {
Modified:
airavata/trunk/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml
URL:
http://svn.apache.org/viewvc/airavata/trunk/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml?rev=1514509&r1=1514508&r2=1514509&view=diff
==============================================================================
---
airavata/trunk/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml
(original)
+++
airavata/trunk/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml
Thu Aug 15 21:44:48 2013
@@ -105,7 +105,7 @@
<include>gpel:gpel_client</include>
<include>xpp5:xpp5</include>
<include>xpp3:xpp3_xpath</include>
- <include>xsul:xsul:jar</include>
+ <include>org.ogce:xsul:jar</include>
<include>xsul5-ogce:xsul5-2007-02-27:jar</include>
<include>xutil:xutil</include>
<include>jython:jython</include>
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=1514509&r1=1514508&r2=1514509&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
Thu Aug 15 21:44:48 2013
@@ -199,7 +199,7 @@ public class WorkflowInterpreter {
ArrayList<Node> readyNodes = this.getReadyNodesDynamically();
ArrayList<Thread> threadList = new ArrayList<Thread>();
if (getRemainNodesDynamically() == 0) {
-
notifyViaInteractor(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED,
WorkflowExecutionState.PAUSED);
+
notifyViaInteractor(WorkflowExecutionMessage.EXECUTION_STATE_CHANGED,
WorkflowExecutionState.STOPPED);
}
// ok we have paused sleep
if (this.getWorkflow().getExecutionState() ==
WorkflowExecutionState.PAUSED) {