Selvam,
I don't believe there is a way to do this right now.
Your scenario requires two-levels of evaluation... it first needs to
evaluate ${expression} to get the value of that, then it needs to do it
again to evaluate the resulting expression.
Currently that is not how expression language works, it only performs the
first evaluation and in the case of RouteOnAttribute that needs to return a
boolean.
-Bryan
On Fri, Oct 7, 2016 at 4:41 AM, Selvam Raman <[email protected]> wrote:
> Hi Bran,
>
> I have an expression in file that have more than 10 condition. I am
> reading a file using list and fetchs3. Using extracttext i am extracting as
> attribute (test).
>
> I am trying to use test in routeonattribute but it shows an error like it
> was expecting boolean but having string value.
>
> please let me know if you have any question.
>
> Thanks,
> selvam R
>
> Thanks,
> Selvam R
>
> On Thu, Oct 6, 2016 at 8:57 PM, Bryan Bende <[email protected]> wrote:
>
>> Hello,
>>
>> I'm not totally sure, but I think this creates two levels of expression
>> language and won't work.
>>
>> Typically the flow file would have an attribute like db.table.name and
>> then in RouteOnAttribute you would define a property like test =
>> ${db.table.name:equals('test')}.
>>
>> -Bryan
>>
>> On Thu, Oct 6, 2016 at 3:31 PM, Selvam Raman <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> can we refer to an attribute from a previous processor for specifying a
>>> boolean clause in routeonattribute processor.
>>>
>>> For Eg. : A flowfile from a previous processor has a attribute called
>>> expression with value ${db.table.name:equals('test')} . Can we refer to
>>> this ${expression} attribute as a boolean clause in routeonattribute
>>> processor ?
>>>
>>> --
>>> Selvam Raman
>>> "லஞ்சம் தவிர்த்து நெஞ்சம் நிமிர்த்து"
>>>
>>
>>
>
>
> --
> Selvam Raman
> "லஞ்சம் தவிர்த்து நெஞ்சம் நிமிர்த்து"
>