Returning a Result From a Script
Scripts run by adTempus can return a result to indicate their outcome (equivalent to returning an exit code from an application).
The kind of value your script returns will depend on the way that the script is being used. In places where adTempus expects a result from a script, the documentation will indicate the value that should be returned. For example, a Script Condition requires that the result be either True or False. For a Script Execution task you can return a numeric value.
The way a script returns a result depends on the kind of script:
- WSH scripts (VBScript, JScript, etc.) set the global Result variable to the appropriate value. For example,
Result=True
- .NET scripts implement a "Run" method that returns a value. The return value from this method is the return value for the script.