[
https://issues.apache.org/jira/browse/NIFI-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15116525#comment-15116525
]
Joseph Witt commented on NIFI-210:
----------------------------------
I think it is better to not require input. Because we don't want to limit
people's usage.
In summary: I propose we make ExecuteScript simply provide a process session to
an evaluated script. We offer two relationships:
* Success
* Failure
We provide the session to to the script execution and it can then obtain,
create, cloned,write, etc... flow file(s) then transfer them to whichever of
the two relationships that make sense for it. "Failure" relationship largely
exists so that they can have their script do things like kick out bad input
flow files. "Success" relationship exists so they can route flowfiles that are
the result of expected behavior. If further routing/distinction is needed then
the script can set attributes and downstream routing decisions can be made. If
more control is desired then InvokeScript is a strong alternative which offers
this.
This approach keeps the users options open to be a source processor,
transformation processor, destination processor, support fan-in, fan-out, they
can do all of it. And still it is all nicely contained within the cozy
confines of the process session which we can automatically commit or rollback.
[~rickysaltzer] [~mattyb149] What say you?
I'm gonna start working up some default script bodies for hello world versions
of these things.
> Provide an ExecuteScript processor
> ----------------------------------
>
> Key: NIFI-210
> URL: https://issues.apache.org/jira/browse/NIFI-210
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Core Framework
> Affects Versions: 0.0.1
> Reporter: A. Steven Anderson
> Assignee: Matt Burgess
> Labels: processor, scala
> Fix For: 0.5.0
>
> Attachments:
> 0001-NIFI-210-few-tweaks-to-drop-static-reference-and-fix.patch
>
>
> Add latest Scala version support for ExcecuteScript processor.
> Should also support Clojure as per discussion and request on mailing list
> http://mail-archives.apache.org/mod_mbox/nifi-dev/201506.mbox/%3CCAMpSqch4GK1gnw6M1u8tH6AN8e_miXZN5SNkAeMjBujXYGqJiw%40mail.gmail.com%3E
> UPDATE: The ScriptEngine for Clojure is not being maintained and is not
> currently available via Maven Central or a public repository. Recommend
> adding Clojure as a separate Improvement Jira case.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)