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. The scripted processor can implement public void setLogger(ComponentLog logger) to get access to the parent logger, as well as public void onScheduled(ProcessContext context) and public void onStopped(ProcessContext context) methods to be invoked when the parent InvokeScriptedProcessor is scheduled or stopped, respectively. Experimental: Impact of sustained usage not yet verified.


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


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 NiFi Expression Language.

NameDefault ValueAllowable ValuesDescription
Script EngineBeanShell
  • BeanShell
  • ECMAScript
The engine to execute scripts
Script FilePath to script file to execute. Only one of Script File or Script Body may be used

This property requires exactly one file to be provided..

Supports Expression Language: true (will be evaluated using variable registry only)
Script BodyBody of script to execute. Only one of Script File or Script Body may be used
Module DirectoryComma-separated list of paths to files and/or directories which contain modules required by the script.

This property expects a comma-separated list of resources. Each of the resources may be of any of the following types: directory, file.

Supports Expression Language: true (will be evaluated using variable registry only)

Dynamic Properties:

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

A script engine property to updateThe value to set it toUpdates 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 (will be evaluated using flow file attributes and variable registry)


This processor has no relationships.

Reads Attributes:

None specified.

Writes Attributes:

None specified.

State management:

LOCAL, CLUSTERScripts can store and retrieve state using the State Management APIs. Consult the State Manager section of the Developer's Guide for more details.


Required PermissionExplanation
execute codeProvides operator the ability to execute arbitrary code assuming all permissions that NiFi has.

System Resource Considerations:

None specified.

See Also: