Example of an Advanced Flow File

Advanced flow files use globalVariables, stageVariables, property substitution, namespaced "included" files, an endStage which always runs, if: conditionals in stage or actions, decomposed/ nested flow files, and bash -c "chained | commands".

The Header contains all include and variables. Read more: variables and include feature.

endStage: Once actions run, the endStage section runs. Common command arguments included here are cleanup, status, and history. If the Flow File contains errors, endStage still runs and tells you why it failed to run successfully.