Return-Path: Delivered-To: apmail-activemq-camel-dev-archive@locus.apache.org Received: (qmail 58474 invoked from network); 17 Jun 2008 06:51:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Jun 2008 06:51:21 -0000 Received: (qmail 67070 invoked by uid 500); 17 Jun 2008 06:51:23 -0000 Delivered-To: apmail-activemq-camel-dev-archive@activemq.apache.org Received: (qmail 67005 invoked by uid 500); 17 Jun 2008 06:51:23 -0000 Mailing-List: contact camel-dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-dev@activemq.apache.org Delivered-To: mailing list camel-dev@activemq.apache.org Received: (qmail 66994 invoked by uid 99); 17 Jun 2008 06:51:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jun 2008 23:51:23 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jun 2008 06:50:42 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 47011234C142 for ; Mon, 16 Jun 2008 23:51:00 -0700 (PDT) Message-ID: <1137067198.1213685460285.JavaMail.jira@brutus> Date: Mon, 16 Jun 2008 23:51:00 -0700 (PDT) From: "Gert Vanthienen (JIRA)" To: camel-dev@activemq.apache.org Subject: [jira] Commented: (CAMEL-612) Exchange should end in error when no choice in a ChoiceType matches In-Reply-To: <9590505.1213598340282.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/activemq/browse/CAMEL-612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43510#action_43510 ] Gert Vanthienen commented on CAMEL-612: --------------------------------------- Claus, I actually do think this use case for a choice() block does make sense. I definitely do not want all my unmatched exchanges to go to any third customer, so I usually code something like: {code} ...otherwise().process(new Processor() { //make the exchange fail here }); {code} ... to get my RouteBuilder's error handler to pick it up. We should at least make this behavior easier to implement or maybe even make it the default when no explicit otherwise() was given. Gert > Exchange should end in error when no choice in a ChoiceType matches > ------------------------------------------------------------------- > > Key: CAMEL-612 > URL: https://issues.apache.org/activemq/browse/CAMEL-612 > Project: Apache Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 1.3.0 > Reporter: Gert Vanthienen > Assignee: Gert Vanthienen > > When you define a route with a choice() and no matching when() clause is found, the Exchange just ends successfully without doing anything. In my mind, it should fail by default in this case (or we should at least have an easy way to get this behavior). > {code} > from(DIRECT_ROUTER).choice() > .when(xpath("/oc:order_confirmation/oc:order/oc:customer/@category = '140'")) > .to(DIRECT_CUSTOMER1) > .when(xpath("/oc:order_confirmation/oc:order/oc:customer/@category = '116'")) > .to(DIRECT_CUSTOMER2); > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.