Previous Topic: Processing Properties SettingsNext Topic: Set Operator Status


Pre-Execution Code and Post-Execution Code

Pre-execution and post-execution JavaScript code is processed before and after an operator runs. Pre-execution code is typically used to set up loop variables or other variables that can be used as part of the operator. Post-execution code is typically used to process the results of an operator or to increase loops indexes.

The OpName keyword can be used to access the operator dataset. For example, the following statement inserts the operator name into a message and assigns the string to a new operator dataset variable named operatorMsg:

Process[OpName].operatorMsg = “Recovery Operator” + OpName + “restructuring main server at “+System[“Date”]+ “:” + System[“Time”];

Typically, you must include code that is closely associated with processing of your specific operator.

For unrelated code, a best practice is to add a separate Calculation operator to the process.

More information:

Specify Operator Dataset Variables