Description:

Experimental - Invokes a script engine for a Processor defined in the given script. The script must define a valid class that implements the Processor interface, and it must set a variable ‘processor’ to an instance of the class. Processor methods such as onTrigger() will be delegated to the scripted Processor instance. Also any Relationships or PropertyDescriptors defined by the scripted processor will be added to the configuration dialog. Experimental: Impact of sustained usage not yet verified.

Tags:

script, invoke, groovy, python, jython, jruby, ruby, javascript, js, lua, luaj

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the Expression Language Guide.

Name Default Value Allowable Values Description
Script Engine ECMAScript * ECMAScript The engine to execute scripts
Script File Path to script file to execute. Only one of Script File or Script Body may be used
Supports Expression Language: true
Script Body Body of script to execute. Only one of Script File or Script Body may be used
Module Directory Comma-separated list of paths to files and/or directories which contain modules required by the script.

Dynamic Properties:

Dynamic Properties allow the user to specify both the name and value of a property.

Name Value Description
A script engine property to update The value to set it to Updates a script engine property specified by the Dynamic Property's key with the value specified by the Dynamic Property's value
Supports Expression Language: true

Relationships:

Name Description
failure FlowFiles that failed to be processed
success FlowFiles that were successfully processed

Reads Attributes:

None specified.

Writes Attributes:

None specified.

See Also:

ExecuteScript