Output properties

Output properties are specialized properties that post-processing scripts generate. You use output properties to make variables available to subsequent steps in a component or generic process.

In the JavaScript code for your postprocessing steps, you can establish output properties. See Examples of post-processing scripts.

You set an output property for a step by assigning it a name and a value in the postprocessing script. For example, the following code from the Check If BLA Exists step in the IBM® WebSphere® Application Server – Deployment plug-in establishes three possible values for the blaExists output property:
def exitCodeChecker = { exitCode ->
    if (exitCode == 0) {
        outputProps.setProperty("blaExists", "true");
        exitValue = 0;
    }
    else if (exitCode == 30) {
        outputProps.setProperty("blaExists", "false");
        exitValue = 0;
    }
    else {
        outputProps.setProperty("blaExists", "unknown");
        exitValue = 1;
    }
You can refer to output property values in other steps in a process. To do so, you must know the name of the step that contains the output property that you use. For example, your process might require different actions if a BLA exists. If you named the Check if BLA Exists step CheckBLA in a process and wanted to run another step if the BLA exists, you might include this code as a precondition:
properties.get("CheckBLA/blaExists") == "true"

You can use output properties in other postprocessing scripts, step preconditions, or the steps themselves. Passing property values among processes, resources, and steps helps limit the requirement to provide input manually and to maintain accuracy and reliability.


Feedback