Specifications

between the regular functions and the cleanup function is possible through the global data
access functions of the Environment class, but this is restricted to plain strings (rather than
arbitrary objects).
After aborting a thread as described, Switch restarts the regular invocation sequence in a new
thread whenever it receives a new processing request.
Other entry points
The entry points related to application discovery/licensing and property validation are invoked
in the same thread (and thus can access the global variable “persistent”) but they are not
automatically bracketed by initializeProcessing and finalizeProcessing. If required, these entry
points must handle initialization and finalization themselves.
Environment class
The single instance of the Environment class is passed as an argument to the script entry points
that operate out of the context of a particular flow element. By convention, the name for the
Environment object is “e” (although the script developer can choose to use another name).
Since the Switch class inherits from the Environment class, any of the functions described in this
topic can be called for the Switch class as well. In other words, you can call the Environment
class functions with “e.function()” or “s.function()” depending on the argument passed to the
entry point.
Logging
Logs a message of the specified type (see below) outside
of a job context. Where possible use the job.log() function
log( type : Number, message :
String, extra : String or Number )
instead, because it includes information about the job
in the message.
Log messages are displayed in the Messages pane and in the Progress pane; see also viewing log
messages and viewing processes.
Log Type
The "type" argument must have one of the following numeric values:
DescriptionDisplay typeNumeric type
An informational message that has no other purpose than to
inform the user of a certain occurrence
Info1
A warning message that informs the user of a recoverable
problem or non-fatal error
Warning2
An error message that informs the user of a fatal errorError3
A formal message that marks the start of a task that should be
displayed in the progress pane
Start4
A formal message that marks the completion of a particular
portion of a task for which a start message was previously issued
Progress5
449
Enfocus Switch 10