camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel P22 <>
Subject Re: How to stop a dynamic route
Date Fri, 03 Jun 2016 15:55:50 GMT
Ranx explain to you, I have a route A, in that route you are going to put a
file with aaaaammdd date format. 

Then Im going to create a dinamic route in the Camel Context using that
date, this route is what you see in the example, I just wanna from the smb
endpoint the files according that date.

When finish the batch, stop and remove the route. I just wanna execute once. 

I use delay=60000  because I want this code to run.

*The Stop Code *

if(context.getRouteStatus("sap-xrt-connect-interface-receive-" +
fileNameOnly).isStarted()){  // Se verifica si se inicio la ruta 
                int CamelBatchValidator = 0; 
                Thread.sleep(10000); // Se realiza la verificacion cada 10
segundos si la interfaz culmino su procesamiento 
                if (CamelBatchComplete=="true"){ 
                 Thread.sleep(20000); // Tiempo adicional para verificar que
todo ha culminado 
                 context.stopRoute("sap-xrt-connect-interface-receive-" +
                 context.removeRoute("sap-xrt-connect-interface-receive-" +
                     CamelBatchComplete = null; 
                //Si la ruta esta vacia o hay error al conectar , esto hara
que entre en el IF de arriba y elimine la ruta 
                if(CamelBatchComplete == null){ 


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message