You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Gunjan Dave <gu...@gmail.com> on 2016/09/11 06:37:08 UTC

Custom expression language functions

Hi Team, is there a way I can create custom functions which can then be
referred in expression language and also be reusable.

Thanks
GUNJAN

Re: Custom expression language functions

Posted by Joe Witt <jo...@gmail.com>.
Hello

At this time expression language functions are not a designed extension
point.  You can of course alter non public parts of the codebase but that
may prove a tricky path for upgrades.  I do recommend simply writing a
processor to do the sort of manipulation you're looking for.  If you find
that proves too unwieldy let's discuss more.

Thanks
Joe

On Sep 11, 2016 7:17 AM, "Gunjan Dave" <gu...@gmail.com> wrote:

> Hi Team, is there a way I can create custom functions which can then be
> referred in expression language and also be reusable.
>
> Thanks
> GUNJAN
>

Re: Custom expression language functions

Posted by Andrew Grande <ap...@gmail.com>.
I think there is a decent compromise available. Or maybe it's there
already? Invoking a public static function via reflection.  There are
deployment and packaging limitations, sure, but at least it makes it easier
for users to invoke utility functions (or custom ones).

Andrew

On Sun, Sep 11, 2016, 5:24 PM Joe Witt <jo...@gmail.com> wrote:

> Gunjan
>
> Can you show some specific el statements youd like to be able to do?
>
> Thanks
> Joe
>
> On Sep 11, 2016 4:24 PM, "Gunjan Dave" <gu...@gmail.com> wrote:
>
> > Hi Joe,
> > Having the ability to extend or customize EL functions is important.
> Infact
> > few important functions like ability to fetch from distributed cache or
> > readily using Certain java claases like java.lang.*, Java.io.*,
> > java.match.* etc are missing.
> >
> > adding processor is certainly feasible but its an extra hop. With the
> > ability to write global functions it can be achived in single processor
> > instead of two.
> >
> > this would prove most useful in advanced rules tab of updateattribute
> > processor.
> >
> >
> >
> > On Sun, Sep 11, 2016, 12:07 PM Gunjan Dave <gu...@gmail.com>
> > wrote:
> >
> > > Hi Team, is there a way I can create custom functions which can then be
> > > referred in expression language and also be reusable.
> > >
> > > Thanks
> > > GUNJAN
> > >
> >
>

Re: Custom expression language functions

Posted by Joe Witt <jo...@gmail.com>.
Gunjan

Can you show some specific el statements youd like to be able to do?

Thanks
Joe

On Sep 11, 2016 4:24 PM, "Gunjan Dave" <gu...@gmail.com> wrote:

> Hi Joe,
> Having the ability to extend or customize EL functions is important. Infact
> few important functions like ability to fetch from distributed cache or
> readily using Certain java claases like java.lang.*, Java.io.*,
> java.match.* etc are missing.
>
> adding processor is certainly feasible but its an extra hop. With the
> ability to write global functions it can be achived in single processor
> instead of two.
>
> this would prove most useful in advanced rules tab of updateattribute
> processor.
>
>
>
> On Sun, Sep 11, 2016, 12:07 PM Gunjan Dave <gu...@gmail.com>
> wrote:
>
> > Hi Team, is there a way I can create custom functions which can then be
> > referred in expression language and also be reusable.
> >
> > Thanks
> > GUNJAN
> >
>

Re: Custom expression language functions

Posted by Gunjan Dave <gu...@gmail.com>.
Hi Joe,
Having the ability to extend or customize EL functions is important. Infact
few important functions like ability to fetch from distributed cache or
readily using Certain java claases like java.lang.*, Java.io.*,
java.match.* etc are missing.

adding processor is certainly feasible but its an extra hop. With the
ability to write global functions it can be achived in single processor
instead of two.

this would prove most useful in advanced rules tab of updateattribute
processor.



On Sun, Sep 11, 2016, 12:07 PM Gunjan Dave <gu...@gmail.com>
wrote:

> Hi Team, is there a way I can create custom functions which can then be
> referred in expression language and also be reusable.
>
> Thanks
> GUNJAN
>