Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 272FB2009F3 for ; Sat, 4 Jun 2016 08:42:58 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 25BE4160A26; Sat, 4 Jun 2016 06:42:58 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 6D90C160A1E for ; Sat, 4 Jun 2016 08:42:57 +0200 (CEST) Received: (qmail 51667 invoked by uid 500); 4 Jun 2016 06:42:56 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Delivered-To: moderator for users@camel.apache.org Received: (qmail 40656 invoked by uid 99); 3 Jun 2016 15:56:00 -0000 X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.486 X-Spam-Level: *** X-Spam-Status: No, score=3.486 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972, URI_HEX=1.313] autolearn=disabled Date: Fri, 3 Jun 2016 08:55:50 -0700 (MST) From: Daniel P22 To: users@camel.apache.org Message-ID: <1464969350052-5783460.post@n5.nabble.com> In-Reply-To: References: <1464861372646-5783385.post@n5.nabble.com> <1464865609645-5783389.post@n5.nabble.com> <8866D1B9-6696-484D-8159-0EB75DE5E0AB@pronoia-solutions.com> Subject: Re: How to stop a dynamic route MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Sat, 04 Jun 2016 06:42:58 -0000 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; do{ 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-" + fileNameOnly); Thread.sleep(10000); context.removeRoute("sap-xrt-connect-interface-receive-" + fileNameOnly); CamelBatchValidator=1; CamelBatchComplete = null; }else{ //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){ CamelBatchComplete="true"; } } }while(CamelBatchValidator==0); Thanks -- View this message in context: http://camel.465427.n5.nabble.com/How-to-stop-a-dynamic-route-tp5783385p5783460.html Sent from the Camel - Users mailing list archive at Nabble.com.