userExitCode

Type: Integer

The userExitCode property of the Process class contains a value returned by your applications when the jade.exe program exits. The default value is zero (0). For more details, see Appendix A, "Exit Values", in the JADE Installation and Configuration Guide.

You can use this property, for example, to set a non‑zero exit code that can then be checked in a batch file by using the ERRORLEVEL keyword to check for appropriate userExitCode values, as shown in the following example.

begin
    beginTransaction;
    process.userExitCode := 123;
    commitTransaction;
    terminate;
end;

The specified value is returned only if the JADE program would have normally returned zero (0); that is, if JADE wants to return a non‑zero exit value, the JADE value takes precedence over your value specified in this attribute.

As the userExitCode property applies to the jade exe node, any JADE application executing from that same client environment can set this value. Cooperation between applications wanting to set this property may therefore be required.

This property gets or sets the exit code for the running jade exe client. The property can be accessed only on the running process. Accessing it on a non‑jade exe client or a process other than the current process of the application results in exception 1265 (Environmental object operation is out of scope for process).

If the client is running as a standard client, the method is equivalent to node.userExitCode for the current processes node.

If the client is running as a presentation client, the exit code is retrieved or set on the jade.exe program of the presentation client.

As the process object is persistent, you must be in transaction state to set the value.

2016.0.02 (Service Pack 1) and higher