The post-processing element

When a plug-in step's <command> element finishes processing, the step's mandatory <post-processing> element runs.

The <post-processing> element sets the step's output properties (step name/property name, see IBM UrbanCode Deploy properties) and provides error handling. The <post-processing> element can contain any valid JavaScript script (unlike the <command> element, <post-processing> scripts must be written in JavaScript).

You have access to a java.util.Properties variable called properties. The properties variable has several special properties: exitCode contains the process exit code, and Status contains the step's status. A Status value of Success means the step completed successfully. The Create File step's post-processing examines the command's exitCode then sets the Status property accordingly.

Another available variable (scanner) can scan the step's output log and run commands based on the results. See Post-processing scripts for an example of scanner usage.

You can use a post-processing script to set output properties that can be used in other steps in the same process, which enables complex workflows. Reference prior step output properties this way:

${p:stepName/propName}

The script that is defined in the <post-processing> element is the step's default behavior. Users can also provide their own script, overriding the default behavior, when they define the step in the IBM UrbanCode Deploy editor, see Post-processing scripts.


Feedback