You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Matt Burgess (JIRA)" <ji...@apache.org> on 2019/02/15 14:48:00 UTC

[jira] [Commented] (NIFI-2215) Enable (when available) annotated methods in InvokeScriptedProcessor

    [ https://issues.apache.org/jira/browse/NIFI-2215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16769381#comment-16769381 ] 

Matt Burgess commented on NIFI-2215:
------------------------------------

I think instead of calling annotated methods (when supported), we should do something like we do with setLogger(), where we will call a specific method if it exists. we could call onScheduled() and onStopped(), passing in the relevant context, if the script has them implemented. That way all scripting engines are supported.

Note that onScheduled() may be called immediately after initialize(), as the scripted processor is often not loaded until InvokeScriptedProcessor is scheduled. I think we should add it for consistency, even if it doesn't end up being any more useful than just putting the code in an initialize() method.

> Enable (when available) annotated methods in InvokeScriptedProcessor
> --------------------------------------------------------------------
>
>                 Key: NIFI-2215
>                 URL: https://issues.apache.org/jira/browse/NIFI-2215
>             Project: Apache NiFi
>          Issue Type: Improvement
>            Reporter: Matt Burgess
>            Priority: Major
>
> Currently, InvokeScriptedProcessor uses only the Processor interface to interact with scripted processors. However many Java processors make use of annotations such as OnScheduled and OnStopped to provide lifecycle logic for the processor. InvokeScriptedProcessor should be enabled to handle this when the script engine allows (such as Groovy, Jython, and JRuby). 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)