Specifications
Sends a file/folder to all outgoing connections with a file filter
that matches the file/folder being sent. If there is no such
sendToFilter( path : String,
name : String )
connection, fail() is invoked instead with an appropriate error
message.
The flow element must have outgoing filter connections without
folder filter properties, otherwise this function logs an error and
does nothing.
Similar to sendToFilter() but also honors the folder filter properties
on the outgoing connections, using the list of folder names passed
in the first argument.
sendToFolderFilter(
foldernames : String[ ], path
: String, name : String )
The flow element must have outgoing filter connections with
folder filter properties, otherwise this function logs an error and
does nothing.
Sends a file/folder to the specified outgoing connection, regardless
of connection type.
sendTo( c : Connection, path
: String, name : String )
Fail functions
See the description of the Environment.log() function for more information on the message and
extra arguments.
A script should invoke failProcess() rather than fail() or failRetry() when it encounters an error
condition that does not depend on the job being processed but rather on the process itself (for
example, a network resource is not available). In such a case all subsequent jobs would fail as
well (because the process is broken) and moving them all to the problem jobs folder makes no
sense. It is much more meaningful to hold the jobs in front of the broken process and retry the
process from time to time. See viewing problem status for more information on problem jobs
and processes.
Logs a fatal error for the job with the specified message and
moves the job to the problem jobs folder.
fail( message : String, extra
: String or Number )
Similar to fail() but requests that Switch retries processing the
job if this was the first attempt at processing it. This is useful if
failAndRetry( message :
String, extra : String or
Number )
an external application or resource produced an error that may
go away when retrying the job a second time. Switch keeps track
of the retry count, so the script doesn’t need to worry about it.
If the job fails a second time it will be moved to the problem jobs
folder.
If the script has the persistent execution mode, Switch will invoke
the finalizeProcessing and initializeProcessing entry points before
trying again, so that the external resource is re-initialized.
Logs a fatal error for the job with the specified message and puts
the flow element instance in the “problem process” state. The
failProcess( message : String,
extra : String or Number )
job is not affected (i.e. it stays in the input folder) and a new
jobArrived event will be generated for the job when the process
is retried.
468
Enfocus Switch 10