camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Simple IN with empty value in list
Date Fri, 02 Dec 2016 17:00:55 GMT
Hi

Yeah that would work, but I just checked you can get empty value if
you use double comma, eg

',,gold,silver'

On Fri, Dec 2, 2016 at 5:46 PM, Quinn Stevenson
<quinn@pronoia-solutions.com> wrote:
> Maybe something like this would work?
>
> .choice.when.simple("${body.stringValue.isEmpty} || ${body.stringValue} in 'gold,silver’")
>
>> On Dec 2, 2016, at 9:23 AM, Claus Ibsen <claus.ibsen@gmail.com> wrote:
>>
>> I dont think an empty value is supported
>>
>> On Fri, Dec 2, 2016 at 3:59 PM, Karts <kartiksankar@gmail.com> wrote:
>>> Sorry, to be clear, body.stringValue could be "", "gold", "silver", "bronze",
>>> "platinum", etc.
>>>
>>> I am trying to test so that only "", "gold" or "silver" are allowed before
>>> moving forward, which is why I have the comma at the start, to allow for a
>>> blank (not null) value:
>>>
>>> .choice.when.simple("${body.stringValue} in ',gold,silver'")
>>>
>>> But I'm finding if body.stringValue="", it does not satisfy the condition.
>>> Is there another way I can do this?
>>>
>>> Thanks
>>>
>>>
>>>
>>> --
>>> View this message in context: http://camel.465427.n5.nabble.com/Simple-IN-with-empty-value-in-list-tp5790907p5790926.html
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> http://davsclaus.com @davsclaus
>> Camel in Action 2: https://www.manning.com/ibsen2
>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Mime
View raw message