Executes a configured JavaScript function for each incoming pipeline row, and optionally around prepare and finish. The script is loaded from jsPath and invoked per row via execFn, with prepareFn and finishFn optionally called once each when the pipeline starts and ends; rows pass straight through unchanged to the next step when no jsPath is configured. Inside the script, pipeline and thisStep give access to the running Pipeline and this step, nextStep wraps the step that would otherwise run next, rowWriter exposes a write() method for forwarding values downstream, log is this step's logger, and formatter, applications and fileManager give access to the platform's formatting, cross-app, and file management services.

Implements: PipelineStep


Properties

PropertyReturnsDescription
descriptionStringHuman-readable summary of this step, shown to administrators managing the pipeline: that it runs custom JavaScript for each incoming row.
execFnStringName of the script function invoked for each incoming row, given the row's values as arguments.
finishFnStringName of the script function invoked once when the pipeline finishes, after all rows have been processed.
formPathStringPath to the Velocity template used by the pipeline management UI to edit this step's configuration.
jsPathStringLocation of the JavaScript file, loaded via the repo app service, that provides prepareFn, execFn and finishFn.
jsTextStringIntended to hold inline script text as an alternative to jsPath, but this field is not currently read by prepare() or exec().
nextPipelineStepThe step invoked for each row when no script is configured, or that a script can forward rows to via nextStep or rowWriter.
nextStepPipelineStepThe step invoked for each row when no script is configured, same as getNext().
prepareFnStringName of the script function invoked once when the pipeline starts, before any rows are processed.

Methods

getFormPath() · getDescription() · getJsPath() · getJsText() · getExecFn() · getFinishFn() · getPrepareFn() · getNext() · getNextStep()

getFormPath()

Returns: String

Path to the Velocity template used by the pipeline management UI to edit this step's configuration.

getDescription()

Returns: String

Human-readable summary of this step, shown to administrators managing the pipeline: that it runs custom JavaScript for each incoming row.

getJsPath()

Returns: String

Location of the JavaScript file, loaded via the repo app service, that provides prepareFn, execFn and finishFn.

getJsText()

Returns: String

Intended to hold inline script text as an alternative to jsPath, but this field is not currently read by prepare() or exec().

getExecFn()

Returns: String

Name of the script function invoked for each incoming row, given the row's values as arguments.

getFinishFn()

Returns: String

Name of the script function invoked once when the pipeline finishes, after all rows have been processed.

getPrepareFn()

Returns: String

Name of the script function invoked once when the pipeline starts, before any rows are processed.

getNext()

Returns: PipelineStep

The step invoked for each row when no script is configured, or that a script can forward rows to via nextStep or rowWriter.

getNextStep()

Returns: PipelineStep

The step invoked for each row when no script is configured, same as getNext().

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.