IBM Tivoli Directory Integrator
Like Connectors and Parsers, IBM TDI allows
you to fully program a Function Component using scripting. This is
done by means of the template that the Scripted FC provides.
The script for the Scripted Function Component is running
in a separate JavaScript Engine. This means that the script cannot
access any variables that are available, or have been set, in the
normal hooks of an AssemblyLine.
Configuration is relatively simple as all logic is in the Script
pane.
- Detailed Log
- When checked, generates additional log messages.
- Comment
- Your own comments go here.
The bulk of the FC is in the script pane; in here, provide
the logic that make up the FC.
To aid in programming, you are provided with stub functions as
a reminder of the functions required to make a valid FC. These are:
- initialize (fc,obj)
- This function is called during the initialization phase of the
AssemblyLine this FC is part of. The obj parameter is null
when this method is called from an AssemblyLine FC.
- terminate (fc)
- This function is called during the termination phase of the
AssemblyLine this FC is part of. Here is where you would release resources, etc.
- perform (fc,obj)
- This is the function that performs the actual work, and is called
by the AssemblyLine at the point you positioned the FC. The obj parameter
is the Entry containing your mapped out Attributes when this method
is called from an AssemblyLine FC.
These correspond to the three main Function Interface methods.
Each method is passed a Function parameter, which is this ScriptedFC.
Common objects (these are the same as for an AssemblyLine):
- main
- The Config Instance (RS object) that is running.
- task
- The AssemblyLine this Parser is a part of.
- system
- A UserFunctions object.
- config
- The configuration for this element, that is, this Function Component.
config.getParent() will be the FunctionConfig for the
AssemblyLine FC, containing the Attribute Mapping and so on.
The following objects are the only ones accessible to the script
Parser:
Script Connector,
Script Parser,
"JavaScript™ Connector" in IBM TDI V7.1 Users Guide.