You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by "Carlos Manuel Fernandes (DSI)" <ca...@cgd.pt> on 2020/04/28 10:23:30 UTC

Terminate process turns ExecuteScript process invalid on nifi-1.11.3

Hello,

I made an upgrade of Nifi from 1.9.2  to 1.11.3 and I see a problem when Terminate a Groovy ExecuteScript process.

The steps to replicate are :

GenerateFlowFile -> Groovy ExecuteScript -> LogAttribute

The executeScript code:

def flowFile = session.get()
sleep(20)
session.transfer(flowFile, REL_SUCCESS)

When ExecuteScript are running , Stop and Terminate the processor, The processor become invalid with the message:
'Script engine' validated against 'groovy' is invalid because Given value not found in allowed set 'ECMA Script'

After that its not possible to set  'script Engine'  property to Groovy and the only workaround i found is to clone  the executeScript and replace the invalid one with  the cloned.

Tanks

Carlos




Re: Terminate process turns ExecuteScript process invalid on nifi-1.11.3

Posted by Matt Burgess <ma...@apache.org>.
Carlos,

This is indeed a bug, although I'm not sure which change introduced
the issue. I have written up NIFI-7404 [1] to describe the problem and
cover the fix. The basic issue is that the wrong thread calls the
method that adds the script engines, so it can't find the ones that
are packaged in the NAR (there are more details in the Jira).

Good catch, thanks for reporting! I have a PR up [2] to fix it
hopefully for the next release.

Regards,
Matt

[1] https://issues.apache.org/jira/browse/NIFI-7404
[2] https://github.com/apache/nifi/pull/4238

On Tue, Apr 28, 2020 at 6:23 AM Carlos Manuel Fernandes (DSI)
<ca...@cgd.pt> wrote:
>
> Hello,
>
>
>
> I made an upgrade of Nifi from 1.9.2  to 1.11.3 and I see a problem when Terminate a Groovy ExecuteScript process.
>
>
>
> The steps to replicate are :
>
>
>
> GenerateFlowFile -> Groovy ExecuteScript -> LogAttribute
>
>
>
> The executeScript code:
>
>
>
> def flowFile = session.get()
>
> sleep(20)
>
> session.transfer(flowFile, REL_SUCCESS)
>
>
>
> When ExecuteScript are running , Stop and Terminate the processor, The processor become invalid with the message:
>
> ‘Script engine’ validated against ‘groovy’ is invalid because Given value not found in allowed set ‘ECMA Script’
>
>
>
> After that its not possible to set  ‘script Engine’  property to Groovy and the only workaround i found is to clone  the executeScript and replace the invalid one with  the cloned.
>
>
>
> Tanks
>
>
>
> Carlos
>
>
>
>
>
>