I thought for sure I read the Jira issue for adding a while loop since I too had to figure out that work around, but I'll be darned if I can find the Jira issue now.
I found a post from last year where Claus said, "There is a JIRA to make the loop like a while loop so we can use a predicate to know if we should continue looping or not. So someday in a future Camel release you can do it." Perhaps that is what I am thinking of, but I cannot find the Jira that Claus is referring to. The concept for adding it is very simple. The one detail to work out is you need to support while and do-while (whether the predicate is checked before the first iteration or not). On Mon, Sep 30, 2013 at 10:43 AM, Goyal, Arpit <arpit.go...@sap.com> wrote: > Hi Dale, > > What you mean by use distribution list to set header to NULL? Can you > share the example (Spring DSL if possible) > Do you mean that we should change the value of Headers > "LOOP_INDEX" & "LOOP_SIZE"? > > Is this the JIRA Item for the same? --> > https://issues.apache.org/jira/browse/CAMEL-4564?jql=text%20~%20%22Loop%20EIP%22 > This propose to create new DSL element (loopTo)? > > Regards, > Arpit. > > -----Original Message----- > From: Dale King [mailto:d...@jadabeauty.com] > Sent: Monday, September 30, 2013 7:24 PM > To: users@camel.apache.org > Subject: Re: Extend Camel Loop to support While Behavior > > There is a JIRA from a year or 2 ago that has no progress. This would be > trivial to add. > > The work around is to use distribution list on a header and when you want > to exit set that header to null. > > On Sep 30, 2013, at 2:28 AM, Claus Ibsen <claus.ib...@gmail.com> wrote: > > > Hi > > > > Yeah we have talked about this in the past. Not sure if there is a > > JIRA. You are welcome to look and if you cant find a JIRA then log a > > new JIRA for this. > > > > > > > > On Mon, Sep 30, 2013 at 6:01 AM, Goyal, Arpit <arpit.go...@sap.com> > wrote: > >> Hi Claus, > >> > >> Is there a plan to support Camel Loop to support While behavior? Is > there a jira issue for the same? > >> > >> Regards, > >> Arpit. > > > > > > > > -- > > Claus Ibsen > > ----------------- > > Red Hat, Inc. > > Email: cib...@redhat.com > > Twitter: davsclaus > > Blog: http://davsclaus.com > > Author of Camel in Action: http://www.manning.com/ibsen > > -- Dale King