airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1355187 - in /incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya: ui/monitor/MonitorEventHandler.java util/InterpreterUtil.java
Date Thu, 28 Jun 2012 22:50:45 GMT
Author: lahiru
Date: Thu Jun 28 22:50:44 2012
New Revision: 1355187

URL: http://svn.apache.org/viewvc?rev=1355187&view=rev
Log:
fixing https://issues.apache.org/jira/browse/AIRAVATA-503.

Modified:
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/monitor/MonitorEventHandler.java
    incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/monitor/MonitorEventHandler.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/monitor/MonitorEventHandler.java?rev=1355187&r1=1355186&r2=1355187&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/monitor/MonitorEventHandler.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/ui/monitor/MonitorEventHandler.java
Thu Jun 28 22:50:44 2012
@@ -169,27 +169,28 @@ public class MonitorEventHandler impleme
 
     private void handleEvent(MonitorEvent event, boolean forward) {
         EventType type = event.getType();
+        //todo currrently we do not set the workflowID properly its just node ID
         URI workflowID = event.getWorkflowID();
 
         List<GraphCanvas> graphCanvases = this.xbayaGUI.getGraphCanvases();
         boolean found = false;
         for (GraphCanvas graphCanvas : graphCanvases) {
             Workflow workflow = graphCanvas.getWorkflow();
-            URI instanceID = workflow.getGPELInstanceID();
-            if (instanceID == null) {
+//            URI instanceID = workflow.getGPELInstanceID();
+//            if (instanceID == null) {
                 // If the workflow doesn't have an instance ID, it's a template.
                 // We handle it so that users can use a workflow template to
                 // monitor a workflow too.
                 // This is also needed in the case of jython workflow.
                 handleEvent(event, forward, workflow.getGraph());
-            } else if (instanceID.equals(workflowID)) {
-                // This is the regular case.
-                found = true;
-                handleEvent(event, forward, workflow.getGraph());
-            } else if (null != workflowID
-                    && -1 != WSDLUtil.findWorkflowName(workflowID).indexOf(WSDLUtil.findWorkflowName(instanceID)))
{
-                handleEvent(event, WSDLUtil.findWorkflowName(workflowID), workflow.getGraph());
-            }
+//            } else if (instanceID.equals(workflowID)) {
+//                This is the regular case.
+//                found = true;
+//                handleEvent(event, forward, workflow.getGraph());
+//            } else if (null != workflowID
+//                    && -1 != WSDLUtil.findWorkflowName(workflowID).indexOf(WSDLUtil.findWorkflowName(instanceID)))
{
+//                handleEvent(event, WSDLUtil.findWorkflowName(workflowID), workflow.getGraph());
+//            }
         }
 
         // Load a sub-workflow.
@@ -354,7 +355,7 @@ public class MonitorEventHandler impleme
         EventType type = event.getType();
         String nodeID = event.getNodeID();
         Node node = graph.getNode(nodeID);
-
+        System.out.println(type);;
         // logger.info("type: " + type);
         if (type == MonitorUtil.EventType.WORKFLOW_INVOKED) {
             workflowStarted(graph, forward);

Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java?rev=1355187&r1=1355186&r2=1355187&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java
(original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/util/InterpreterUtil.java
Thu Jun 28 22:50:44 2012
@@ -349,7 +349,7 @@ public class InterpreterUtil {
 		int sum = 0;
 		List<NodeImpl> nodes = graph.getNodes();
 		for (Node node : nodes) {
-			if (NodeController.getGUI(node).getBodyColor() == color) {
+			if (color.equals(NodeController.getGUI(node).getBodyColor())) {
 				++sum;
 			}
 		}



Mime
View raw message