airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1475908 - /airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.java
Date Thu, 25 Apr 2013 19:16:07 GMT
Author: lahiru
Date: Thu Apr 25 19:16:06 2013
New Revision: 1475908

URL: http://svn.apache.org/r1475908
Log:
fixing https://issues.apache.org/jira/browse/AIRAVATA-821.

Modified:
    airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/interpretor/WorkflowInterpreter.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=1475908&r1=1475907&r2=1475908&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 Apr 25 19:16:06 2013
@@ -177,7 +177,7 @@ public class WorkflowInterpreter {
 				}
 				// get task list and execute them
 				ArrayList<Node> readyNodes = this.getReadyNodesDynamically();
-				for (Node node : readyNodes) {
+				for (final Node node : readyNodes) {
 					if (node.isBreak()) {
 						this.notifyPause();
 						break;
@@ -186,7 +186,20 @@ public class WorkflowInterpreter {
 							|| this.getWorkflow().getExecutionState() == WorkflowExecutionState.STOPPED) {
 						break;
 					}
-					executeDynamically(node);
+
+                    // Since this is an independent node execution we can run these nodes
in separate threads.
+                    Thread th = new Thread() {
+
+                        public synchronized void run() {
+                            try {
+                                executeDynamically(node);
+                            } catch (WorkflowException e) {
+                                log.error("Error execution workflow Node : " + node.getID());
+                                return;
+                            }
+                        }
+                    };
+                    th.start();
 					if (this.getWorkflow().getExecutionState() == WorkflowExecutionState.STEP) {
 						this.getWorkflow().setExecutionState(WorkflowExecutionState.PAUSED);
 						break;



Mime
View raw message