Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 33731 invoked from network); 17 Sep 2010 21:59:39 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Sep 2010 21:59:39 -0000 Received: (qmail 89658 invoked by uid 500); 17 Sep 2010 21:59:39 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 89605 invoked by uid 500); 17 Sep 2010 21:59:38 -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 Received: (qmail 89597 invoked by uid 99); 17 Sep 2010 21:59:38 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Sep 2010 21:59:38 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of dwhytock@gmail.com designates 209.85.214.173 as permitted sender) Received: from [209.85.214.173] (HELO mail-iw0-f173.google.com) (209.85.214.173) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Sep 2010 21:59:17 +0000 Received: by iwn38 with SMTP id 38so2215961iwn.32 for ; Fri, 17 Sep 2010 14:58:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ZH4PGY9J7PeDlxF/PZKFf/R06DEX+sSuKk+fuCvbSUQ=; b=JckmP9UI7Ndne36+2aam2IZ7Wd06SdFT3CUIoWzj7h8U51akEARqA7Wv1Rwqmut4ka oiFYh76evVIT+pJ4I04d3Y/DmFcXpknQbovsfX4usmbItrC67+v5S5EEJKMZf/uj/XyY IgzTzEkM0DtPCEQdSGYm3FIBSkBXRqPKA4zqE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=V+d90wiKMlt8yREbhFiQQ9/1ZgQeNIpv6B0hRcl6pfoFlUA1+APfGAXrOYp8T3GnxB 0ERcb4CitnIXVoDZpLnV090AjZOVKunOR0VhyJjNRmwoFYBOWvtKZyGL4QhLTV8UbX/p vR8pjK2LNkf4ojePW9PMlhDR2eEy8EIu/zbrE= MIME-Version: 1.0 Received: by 10.231.190.149 with SMTP id di21mr5690939ibb.166.1284760734999; Fri, 17 Sep 2010 14:58:54 -0700 (PDT) Received: by 10.231.79.207 with HTTP; Fri, 17 Sep 2010 14:58:54 -0700 (PDT) In-Reply-To: References: Date: Fri, 17 Sep 2010 17:58:54 -0400 Message-ID: Subject: Re: choose() question From: Donald Whytock To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Can I chain whens? As in, from(endpoint).when(pred1).when(pred2).when(pred3).process(processor), where processor gets invoked only if all the preds return true? Or does a when need to be followed by something-not-a-when? On Thu, Sep 16, 2010 at 1:06 PM, Claus Ibsen wrote: > You can use an interceptor and then stop() when to abort. > > Or you can set the Exchange.STOP property on the Exchange from a > Processor to tell it to stop > > > On Thu, Sep 16, 2010 at 7:04 PM, Donald Whytock wrot= e: >> Is there something along the lines of an abortable Pipeline, such that >> it will go through a sequence of processors until one of them returns >> a certain value, sets a property on the exchange, etc? >> >> On Thu, Sep 16, 2010 at 12:49 PM, Claus Ibsen wr= ote: >>> On Thu, Sep 16, 2010 at 6:45 PM, Donald Whytock wr= ote: >>>> Hi all... >>>> >>>> Newbie question regarding choose(). =A0Given >>>> >>>> from(endpoint).choose() >>>> =A0.when(predA).process(processorA) >>>> =A0.when(predB).process(processorB); >>>> >>>> If predA and predB are both true, do processorA and processorB both >>>> get called? =A0Or does processing stop with processorA? >>>> >>> >>> Only the first one is chosen. (its not a case, always only 1 at most >>> is selected) >>> >>> >>>> Don >>>> >>> >>> >>> >>> -- >>> Claus Ibsen >>> Apache Camel Committer >>> >>> Author of Camel in Action: http://www.manning.com/ibsen/ >>> Open Source Integration: http://fusesource.com >>> Blog: http://davsclaus.blogspot.com/ >>> Twitter: http://twitter.com/davsclaus >>> >> > > > > -- > Claus Ibsen > Apache Camel Committer > > Author of Camel in Action: http://www.manning.com/ibsen/ > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus >