*
Metamerge logo
Search

Advanced Search
*
*
*
* HOME DOCUMENTS & RESOURCES DOWNLOADS EARLY TECH ACCESS SUPPORT FAQ KNOWN ISSUES OLD VERSIONS
*

The AssemblyLine Connector object

The AssemblyLine Connector object is a wrapper that provides additional functionality to the  Connector. The AL Connector is the one calling the hook functions you define in the AssemblyLine and also the one that performs the attribute mapping. Each Connector in the AssemblyLine is given a name that is automatically available in your scripts as that name. If you name a Connector "ldap" it will also be used as the script object name. Make sure you name your Connectors in a way that is compatible with the selected scripting language. Typically, you should avoid using white-space and special characters.

The AssemblyLine Connector has the following methods and properties:

Function Description
getDebug() Returns the debug flag for this Connector
setDebug ( boolean ) Enables/Disables debug for this Connector
getStats() Returns the statistics object for this Connector
getnext() Returns the next entry from the underlying Connector. 
getNextDuplicateEntry() Returns the next duplicate entry found during a lookup or update operation
getDuplicateEntryCount() Returns the number of duplicate entries found during a lookup or update operation.
lookup (work) Performs a lookup using the configured search criteria with values from work entry
lookup ( attribute, value ) Performs a lookup using exact matching for attribute=value
delete ( work ) Performs a delete operation using configured search criteria with values from work entry
update ( work ) Performs either an add or a modify using configured search criteria with values from work entry
trigger ( name, work, conn ) Calls the hook name using work and conn.
Properties Description
connector The Connector object

The trigger function calls one of the AssemblyLine hooks defined for this Connector using the provided conn/work. The return value is either true if the hook was executed or false if the hook is not defined or disabled. 

Example:

Suppose you have an iterating input Connector called MyConnector and wanted to log the total number of reads performed. You could script

task.logmsg("Number of records read: " + MyConnector.getStats().numGet());

 

*
  Metamerge Integrator version 4.5 ©Copyright Metamerge AS 2000-2002 Last edited 2002-04-30 contact us