Specifications
This entry point is invoked each time a new job arrives in one of the
input folders for the script element. The newly arrived job is passed
to the entry point as the second argument.
jobArrived( s : Switch, job
: Job )
This entry point is invoked for the first time immediately after the
flow is activated and thereafter it is invoked at regular intervals
timerFired( s : Switch )
regardless of whether a new job arrived or not. The default value
for the interval is 300 seconds (5 minutes); it can be modified with
Switch.setTimerInterval().
Property editing
These optional entry points support editing and validating properties defined in the script
declaration; see property definition properties, property editors and validating property values.
Invoked when a user chooses the “Select from library” or
“Select many from library” property editor in the designer
getLibraryForProperty( s : Switch,
tag : String ) : String[ ]
for one of this script’s properties. The second argument
specifies the tag of the property involved in the operation.
Returns the list of strings to display in the property editor
dialog.
If this entry point is absent, it is considered to return an
empty list.
Invoked when a user chooses the “Select from library” or
“Select many from library” property editor in the designer
getLibraryForConnectionProperty(
s : Switch, c : Connection, tag :
String ) : String[ ]
for a property injected on this script’s outgoing connections.
The second and third arguments specify the connection and
the tag of the property involved in the operation.
Returns the list of strings to display in the property editor
dialog.
If this entry point is absent, the getLibraryForProperty entry
point is invoked instead, omitting the connection argument.
This is meaningful in case the result does not depend on the
connection involved in the operation.
Invoked at appropriate times to validate the value of a
property for the script with “custom” validation, example:
isPropertyValid( s : Switch, tag :
String, value : String ) : Boolean
when the user changes the property value in the designer,
when the user attempts to activate the flow in which the
script resides, or just before invoking the jobArrived entry
point (while the flow is running). See validating property
values.
The second argument specifies the tag of the property that
needs to be validated.
The third argument specifies the current value of the property.
It is provided for convenience only; it is identical to the return
value of getPropertyValue(tag).
445
Enfocus Switch 10