I'm not 100% sure how tied to nifi-api it is, but I think you might be able to do a lot by calling these methods on PreparedQuery [1]. You would first call Query.prepare(rawValue) to get the instance of PreparedQuery.
Those two parts should be independent of of nifi-api, and nifi-expression-language is already a separate maven module you could bring in as a dependency. [1] https://github.com/apache/nifi/blob/master/nifi-commons/nifi-expression-language/src/main/java/org/apache/nifi/attribute/expression/language/PreparedQuery.java#L27-L29 On Fri, Mar 15, 2019 at 2:33 PM Jon Logan <[email protected]> wrote: > > Have you considered the Spring Expression Language? It might be more general > purpose and segmentable than the NiFi EL. I am not aware of any capability > that NiFi EL has that SpEL does not, but perhaps there is some. > > On Fri, Mar 15, 2019 at 11:25 AM Joe Witt <[email protected]> wrote: >> >> Tim, >> >> It is certainly feasible/interesting but it would require a lot of legwork >> to extract and make it into its own thing that then is used by NiFi and then >> other things. We could spawn it into its own subproject to facilitate >> perhaps.. >> >> Such ideas are often tough to pursue though as it might be too tied to NiFi >> specifically (not sure that it is) and it requires spending a good bit of >> time not specific to NiFi (not always easy to build that momentum/community). >> >> Definitely understand your idea and I think it is cool you'd suggest it. I >> suspect though you'll have to be in position to help do heavy lifting to >> make it a thing. >> >> Thanks >> Joe >> >> On Fri, Mar 15, 2019 at 2:07 PM Tim Zimmerman <[email protected]> wrote: >>> >>> The NiFi Expression Language is quite powerful. I am working on another >>> project where I would love to have this sort of functionality and am >>> wondering how hard it would be to use nifi-expression-language outside of >>> NiFi, in some other Java app. >>> >>> I have looked at some other alternatives (e.g. JEXL, JUEL) but we are >>> already using NiFi and so are familiar with the syntax. And it seems more >>> powerful than some of the alternatives. >>> >>> How feasible is this idea? >>> >>> >>> >>> -- >>> Sent from: http://apache-nifi-users-list.2361937.n4.nabble.com/
