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
| Property | Returns | Description |
|---|---|---|
| description | String | Human-readable summary of this step, shown to administrators managing the pipeline: that it runs custom JavaScript for each incoming row. |
| execFn | String | Name of the script function invoked for each incoming row, given the row's values as arguments. |
| finishFn | String | Name of the script function invoked once when the pipeline finishes, after all rows have been processed. |
| formPath | String | Path to the Velocity template used by the pipeline management UI to edit this step's configuration. |
| jsPath | String | Location of the JavaScript file, loaded via the repo app service, that provides prepareFn, execFn and finishFn. |
| jsText | String | Intended to hold inline script text as an alternative to jsPath, but this field is not currently read by prepare() or exec(). |
| next | PipelineStep | The step invoked for each row when no script is configured, or that a script can forward rows to via nextStep or rowWriter. |
| nextStep | PipelineStep | The step invoked for each row when no script is configured, same as getNext(). |
| prepareFn | String | Name 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().