ExecuteScript 2025.10.9.21

Bundle

org.apache.nifi | nifi-scripting-nar

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

Input Requirement

ALLOWED

Supports Sensitive Dynamic Properties

true

Properties

PropertyDescription
Module DirectoryComma-separated list of paths to files and/or directories which contain modules required by the script.
Script BodyBody of script to execute. Only one of Script File or Script Body may be used
Script EngineLanguage Engine for executing scripts
Script FilePath to script file to execute. Only one of Script File or Script Body may be used

State management

ScopesDescription
LOCALScripts can store and retrieve state using the State Management APIs. Consult the State Manager section of the Developer’s Guide for more details.
CLUSTERScripts can store and retrieve state using the State Management APIs. Consult the State Manager section of the Developer’s Guide for more details.

Restrictions

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

Relationships

NameDescription
failureFlowFiles that failed to be processed
successFlowFiles that were successfully processed

See also