*
Metamerge logo
Search

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

Hooks

An AssemblyLine relies on certain primitive functions like the Connector objects getnext() that will get the next record from the underlying Connector.

The AssemblyLine objects (EventHandler, Connector) have a mechanism called Hooks enabling you to

  1. Override  the basic fetch/put functions for Connectors
  2. Respond to events signalled by the assemblyline: For example, an iterator Connector will have a GetNext fail hook that can be programmed to log (or send mail about) input errors.
  3. Modify the flow of the AssemblyLine (like skipping a Connector).

These Hooks are common for all Connectors

Default OK  Called when a Connector operation has succeeded, after all other OK hooks.
Default Fail  Called when an error occurs during a Connector operation, unless the mode spesific fail Hook is used. (GetNext fail, AddOnly fail, etc.)
Before Initialize   Called before initialize of the Connector is attempted
After Initialize   Called after the Connector has been initialized
Before Close   Called before the Connector is closed
After Close   Called after the Connector was closed
Before Execute   Called before every execution of the Connector

These Hooks are available for Connectors in Iterator mode

Before selectEntries   Called before the Connector selects entries as part of the initialization
After selectEntries   Called after the Connector has selected entries (in the initialization)
Before GetNext   Called before the Connector attempts to get the next item
After GetNext  Called after a getnext is successfully performed on the Connector, before mapping is done. An object named conn is available for inspecting or changing the attributes retrieved from the Connector
GetNext OK   Called after a successful get operation
GetNext Fail   Called when the getnext operation fails

These Hooks are available for Connectors in AddOnly mode

Before Add   Called before an add operation is attempted
After Add    Called after an entry was successfully added
AddOnly OK   Called after a successful add operation
AddOnly Fail   Called when the add operation fails

These Hooks are available for Connectors in Delete mode

Before Delete    Called before delete is attempted
After Delete    Called after an entry was deleted
Delete OK  Called after a successful delete operation
Delete Fail  Called when the delete operation fails

These Hooks are available for Connectors in Lookup mode

Before Lookup    Called before lookup is attempted
After Lookup   Called after an entry was found, before mapping is done. An object named conn is available for inspecting or changing the attributes retrieved from the Connector
Lookup OK  Called after a successful lookup operation
Lookup Fail  Called when the lookup operation fails (no entries found, or multiple entries found and not allowed)
Multiple Entries Found When the result is more than one matching entry, and the "Allow Duplicates" flag is not set, the Connector calls this Hook if it exists, otherwise Lookup fail is called

These Hooks are available for Connectors in Update mode

Before Add   Called before an add operation is attempted
After Add    Called after an entry was successfully added
Before Modify   Called before a modify operation is attempted
After Modify   Called after an entry was modified
Modify NoChanges   Called when an Update Connector with the Compute Changes flag set, reports no changes to update
Before Applying Changes  Called immediately before a modification is performed. This Hook is called only when the Compute Changes flag is set. If no changes apply, the Modify No Changes Hook is called instead
Before Update   Called before an update is attempted (add or modify)
After Update   Called after successful update (add/modify)
Update OK   Called after a successful update operation (add / modify)
Update Fail   Called when the update operation fails (add / modify)
Multiple Entries Found Called when there are more than one matching entry. If no Hook is defined and there are multiple entries, the update is not performed.
 
*
  Metamerge Integrator version 4.5 ©Copyright Metamerge AS 2000-2002 Last edited 2002-04-30 contact us