Directory Integrator, Version 7.0
IBM® Tivoli® Directory Integrator provides the v.6-compatible Expressions feature that allows you to compute parameters and other settings at run time, making your solutions dynamically configurable. This feature expands on the Properties handling found in previous versions.
In addition to support for simple External Properties references (fully compatible with earlier versions), Expressions provide more power in manipulating AssemblyLine and component configuration settings during AL or component initialization and execution. Expressions can also be used for Attribute maps, as well as for Conditions and Link Criteria, alleviating much of the scripting previously required to build dynamically configured solutions. IBM Tivoli Directory Integrator provides an Expression Editor to facilitate building these expressions.
The Expressions feature is built on top of the services provided by the standard Java java.text.MessageFormat class. The MessageFormat class provides powerful substitution and formatting capabilities. Here is a link to an online page outlining this class and its features: http://java.sun.com/j2se/1.5.0/docs/api/java/text/MessageFormat.html.
| TDI reference | Value | Availability |
|---|---|---|
| work.attrname[.index] | The work entry in the current AssemblyLine.
The optional index refers to the nth value of the attribute. Otherwise the first value is used.
This Advanced attribute map: ret.value = work.getString (“givenName”) + “ “ + work.getString(“sn”);can be expressed simply as: {work.givenName} {work.sn}
|
AssemblyLine |
| conn.attrname[.index] | The conn entry in the current AssemblyLine. The optional index refers to the nth value of the attribute. Otherwise the first value is used. | AssemblyLine during attribute mapping |
| current.attrname[.index] | The current entry in the current AssemblyLine The optional index refers to the nth value of the attribute. Otherwise the first value is used. | AssemblyLine during attribute mapping for Modify |
| config.param | The configuration object of the current component AL. Furthermore, if config is used in the parameter of a Connector, Parser or Function, then it refers to the Config object Interface of that component, for example, JDBC Connector, or XML Parser.
param is the name of the parameter itself, as if you were to make a call to getParam() or setParam(). For example, for the JDBC Connector you could make the following reference: {config.jdbcSource]
|
AssemblyLine |
| alcomponent.name.param | The component Interface parameter value of a named AssemblyLine component.
name is the name of the AssemblyLine component
param is the parameter name of the name object
So, the following Expression: {alcomponent.DB2conn.jdbcSource}
is equivalent to the following scripted call: DB2conn.connector.getParam (“jdbcSource”); |
AssemblyLine |
| property[:storename].name property[:storename/bidi].name | A TDI-Properties reference. The optional storename targets a specific Property Store. If no storename is specified, then the default store is used. name is the property name bidi will, when present, set the parameter value to forward the call to the referenced Property Store. When bidi is present no other substitution patterns or text is allowed. | Always |
JavaScript<<EOF Note: v.6 syntax; use Advanced (JavaScipt) option in the Expression Editor instead
|
Embedded script code used to generate a value for the Expression. This script must return a value.
The “EOF” text used here is an arbitrary string that terminates the JavaScript snippet. The JavaScript is collected until a single line with the EOF string is encountered, or no EOF is flag is set – see the note below.
Note that embedded JavaScript is evaluated using the script engine instance of the AssemblyLine, so you have access to all variables otherwise present for scripting. Note: There is a shorthand form of adding JavaScript that works for input fields that do not support multiple lines (like Link Criteria or the names of Attributes in maps) and can therefore not have the necessary EOF line:
{JavaScript return work.givenName
+ " " + work.surName}
|
Always |