ExecuteScript
Description
Experimental - Executes a script given the flow file and a process session. The script is responsible for handling the incoming flow file (transfer to SUCCESS or remove, e.g.) as well as any flow files created by the script. If the handling is incomplete or incorrect, the session will be rolled back. Experimental: Impact of sustained usage not yet verified.
Tags
clojure, execute, groovy, script
Properties
In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.
Display Name | API Name | Default Value | Allowable Values | Description |
---|---|---|---|---|
Script Engine * | Script Engine | Clojure |
| Language Engine for executing scripts |
Script File | Script File | Path to script file to execute. Only one of Script File or Script Body may be used Supports Expression Language, using Environment variables. | ||
Script Body | Script Body | Body of script to execute. Only one of Script File or Script Body may be used | ||
Module Directory | Module Directory | Comma-separated list of paths to files and/or directories which contain modules required by the script. Supports Expression Language, using Environment variables. |
Dynamic Properties
Name | Value | Description |
---|---|---|
Script Engine Binding property | Binding property value passed to Script Runner | 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: Yes, evaluated using FlowFile Attributes and Environment variables. |
Relationships
Name | Description |
---|---|
failure | FlowFiles that failed to be processed |
success | FlowFiles that were successfully processed |
Reads Attributes
This processor does not read attributes.
Writes Attributes
This processor does not write attributes.
State Management
Scope | Description |
---|---|
CLUSTER, LOCAL | Scripts can store and retrieve state using the State Management APIs. Consult the State Manager section of the Developer's Guide for more details. |
Restricted
Required Permission | Explanation |
---|---|
execute code | Provides operator the ability to execute arbitrary code assuming all permissions that NiFi has. |
Input Requirement
This component allows an incoming relationship.
System Resource Considerations
This component does not specify system resource considerations.