Specifications
• One of the temporary paths returned by Job.createPathWithName/Extension().
• A file inside a folder located at one of the temporary paths, which is useful in case the script
can control the location but not the name of the output file to be sent along (because some
other process determines it).
• Any other path, which is useful in case the script can’t control the location of the output file
to be sent along (because some other process determines it).
In their optional “name” argument the sendTo() functions expect to be passed the filename for
the output file or job folder (including filename extension; a path portion and/or a unique name
prefix are ignored). If the “name” argument is null or missing, the filename in the “path”
argument is used instead.
The sendTo() functions automatically insert or replace the unique name prefix as appropriate,
and they move or copy files as needed.
After the entry point returns, Switch removes all jobs for which one or more sendTo() functions
were called from the input folder, and it deletes any file or folder left at any of the paths passed
to any of the sendTo() functions. Thus a script should never call sendTo() on files that must be
preserved. For example, a script that injects a file from an asset management system into a flow
should copy the file to a temporary location and then call sendTo() on the copy.
Marks the job as completed without generating any output. The
path is ignored other than for marking the indicated file/folder
for deletion.
sendToNull( path : String )
Sends a file/folder to the single outgoing move connection. If the
flow element has outgoing connection(s) of another type or if it
sendToSingle( path : String,
name : String )
has more than one move connection this function logs an error
and does nothing. If the flow element has no outgoing
connections, fail() is invoked instead with an appropriate error
message.
Sends a file/folder to any and all outgoing traffic-light data
connections that have the specified level property enabled (success
sendToData( level: Number,
path : String, name : String
)
= 1, warning = 2, error = 3). If the flow element has outgoing
connection(s) of another type this function logs an error and does
nothing. If the flow element has no outgoing data connections
of the specified level, fail() is invoked instead with an appropriate
error message.
Sends a file/folder to any and all outgoing traffic-light log
connections that havethe specified level property enabled (success
sendToLog( level: Number,
path : String, name : String,
model : String )
= 1, warning = 2, error = 3). If the flow element has outgoing
connection(s) of another type this function logs an error and does
nothing. If the flow element has no outgoing log connections of
the specified level, nothing happens (i.e. the log file is discarded).
The model argument is used only in case the log file is sent over
a “Data and log” connection as a metadata dataset attached to
the job. In that case the value of model determines the data
model of the dataset ("XML", "JDF", "XMP" or "Opaque"). If the
argument is nil or missing or if it has an unsupported value, the
data model is set to "Opaque".
467
Enfocus Switch 10