Entry
The TDI Entry object is like a Java 'bucket' that is used to carry
Attributes which in turn hold the actual data values you are working with. TDI provides one primary bucket called the
Work Entry that all
AssemblyLine components work with. The Work Entry is available to scripts as the pre-registered
work variable.
In addition,
Connectors and
Functions (FCs) have their own local Entry bucket used to cache read and write operations. This is called the
Conn Entry, and acts as the
source for Input
Attribute Maps and the
target for Output Maps (and both for
AttMaps). When scripting in the context of a component, TDI provides access to the Conn Entry via the
conn variable. Note that the
TDI Flow Diagrams illustrate when a
conn Entry is available.
In addition, any time TDI does a
lookup operation (e.g. Lookup, Update or Delete mode Connector behavior) then there is also a
current Entry. This bucket is an exact copy of
conn until Output Mapping takes place, at which time only
current maintains the data read.
Another important Entry is the
error object which shows up whenever you are in an Error Hook. The Error Entry contains Attributes that hold information about the error that are
detailed here. These Attributes are:
- status - The error status (which will have the value "fail" once you are in an Error Hook.
- connectorname - Contains the name of the component where the error occurred.
- operation - The internal name of the action that was being performed. For example, an AttributeMap, Hook or interface operation (like the getnext operation of Iterator mode).
- exception - The full exception text.
- message - The error message.
- class - The type of error (exception class), which often gives you a clue as to which system originated the error.
Entry objects can be displayed using the
task.dumpEntry() function; or in some cases when your script is not running in the context of an initialized AL, the
main.dumpEntry() function. You can also print an abbreviated version of an Entry using
task.logmsg(entry).
Furthermore, all Entry's provide the same set of methods for adding, examining or modifying Attributes and Attribute values.
--
EddieHartman - 18 Dec 2006
This is a
GlossaryEntry