Hi,

I made a modification to add the sequence number in the
ServicemixComponentsFlow. I'm working in 3.2.2 version. It shows you the
order in which endpoints relate each other. It starts from 0 using the
sequence number or the exchangeid.

I'm asking for an opinion if it is usefull and if it could be added to the
source code or if it can be improved.

Regards
Zacarias
Index: .
===================================================================
--- .	(revision 764809)
+++ .	(working copy)
@@ -28,6 +28,7 @@
 import javax.jbi.messaging.MessageExchange;
 import javax.jbi.servicedesc.ServiceEndpoint;
 
+import org.apache.commons.lang.StringUtils;
 import org.apache.servicemix.JbiConstants;
 import org.apache.servicemix.jbi.event.ComponentEvent;
 import org.apache.servicemix.jbi.event.ComponentListener;
@@ -159,7 +160,11 @@
             String dest = EndpointSupport.getUniqueKey(mei.getEndpoint());
             Map<String, Boolean> componentFlow = createSource(source);
             if (componentFlow.put(dest, Boolean.TRUE) == null) {
-                flowLinks.add(encode(source) + " -> " + encode(dest));
+            	String exchangeId = event.getExchange().getExchangeId();
+            	int idFlowPosition = exchangeId.length() - 1; 
+            	String idFlow = exchangeId.substring(idFlowPosition);
+            	idFlow = idFlow.substring(idFlow.length() - 1);
+                flowLinks.add(encode(source) + " -> " + encode(dest) + "[label=\"" + idFlow +"\",len=1.00]");
                 viewIsDirty(mei.getEndpoint());
             }
         }

Reply via email to