IBM Tivoli Directory Integrator
Null Behavior
Occasionally, the system tries to map an attribute that is missing.
For example, if an optional telephone number is not present in the
input data source, or an attribute in an Output Map is removed from
the Work entry. Other times although an attribute is present, it has
no values - like a nullable column in an database table.
Different data sources treat missing values in different ways (null
value, empty string) and the feature described in this section provides
a way of customizing how missing attributes - or attribute values
- are treated. This feature is called Null Behavior and
with it we can define both what a "null value" is as well as how
it is to be handled.
The JDBC Connector has the jdbcExposeNullValues parameter
setting, enabling you to map null values to missing Attributes (see
"JDBC Connector" in IBM Tivoli Directory Integrator V7.1 Reference
Guide).
Null behavior can be specified at a number of levels: system, Config, AssemblyLine, AttributeMap and Attribute. However, since Null Behavior
is highly data source-specific, it makes most sense to set this system
property at the Attribute map level (for example, for all Attributes
handled by a Connector's Input or Output Maps). These possible levels
are described here in more detail:
- System level
- Specifying system level Null Behavior is done in the global.properties
file by setting the rsadmin.attribute.nullBehavior and rsadmin.attribute.nullDefinition properties, one of the values listed later in this section.
- Config level
- This overrides System level Null Behavior, and is configured by
setting the rsadmin.attribute.nullBehavior or rsadmin.attribute.nullDefinition properties
in a Property Store to one of the following values listed later in
this section.
- AssemblyLine level
- AssemblyLine Null Behavior is specified in by clicking the Options... button
in the AssemblyLine toolbar, select AssemblyLine settings, and click Null Value Behavior in the dialog
box that comes up.
- Attribute map level
- Defining Null Behavior for all the Attributes in a map is done
by clicking the More... button above the attribute
map list, and selecting Null behavior.
- Attribute level
- Null Behavior can be configured for a specific attribute by right-clicking
on it in an attribute map and selecting Null behavior.
When this has been defined for an Attribute, then this is indicated
by the presence of a blue bullet symbol in the mapped item.
Null Behavior supports five different settings for defining what
a null value is, as shown below (Note that the text in parenthesis
for each setting is the value used to set the System-level Null Behavior
definition, and is typically defined in the Solution or Global Property
Store). Each setting shows the actual property value in parenthesis.
Note that these definitions are listed in inclusive order, so that
the second case also includes the first one; the third one includes
the first two; and so forth:
- Attribute is missing (AbsentAttribute)
- The Attribute referenced as the source of value(s) in an attribute
map is missing.
- Attribute with no values (EmptyAttribute)
- The Attribute used as the source of value(s) in an Attribute is
found, but has no values. The previous case is also checked for.
- Attribute contains an empty string value (EmptyString)
- The Attribute is found, but has only a single string value.
- Value (value)
- The Attribute contains a specified value. For AssemblyLine, attribute
map and Attribute-level null value definition, this value is set in
the Value field of the Null Behavior dialog.
Here we can specify multiple attribute values if desired by placing
values on separate lines. If we use rsadmin.attribute.nullDefinition for
system and Config level setting then also set the rsadmin.attribute.nullDefinitionValue property.
Several
enhancements have been made to the HTTP server connector. TCP-based
components, like the HTTP server Connector, have a switch in their
Config screens for returning TCP headers as Attribute values. When
this flag is cleared, TCP headers are stored as properties in the
returned entry object.
- Default Behavior (Default Behavior)
- The null value definition must be inherited from a higher level.
For example, an Attribute inherits its null value definition from
the attribute map setting, which in turn inherits it from the AssemblyLine.
Config
level Null Behavior overrides any system level settings. Furthermore, the Default Behavior setting at system level is the same as specifying delete, while at Config level it is equivalent to value.
The Null Behavior feature also lets you define the action to be
taken in case a null value is detected:
- Empty String (empty string)
- Missing attributes are mapped with a single value which has an
empty String value ("").
- Null (null)
- Missing attributes are mapped with no values, meaning that the att.getValue() call
returns null.
- Delete (delete)
- The attribute is removed from the map.
- Value (value)
- Missing attributes are mapped with a specified value. For AssemblyLine, attribute map and Attribute-level Null Behavior, the values are set
in the Value edit of the Null Behavior Dialog. Here we can
specify multiple attribute values if desired by placing values on
separate lines. If we use rsadmin.attribute.nullBehavior for
system and Config level settings then also set the rsadmin.attribute.nullBehaviorValue property.
- Default Behavior (Default Behavior)
- Null Behavior must be inherited from a higher level. For example, Attribute level inherits from the AttributeMap, which in turn inherits
from the AssemblyLine setting.
Config level Null Behavior overrides
any system level settings. Furthermore, the Default Behavior setting
at system level is the same as specifying delete, while at
Config level this is equivalent to value.
Parent topic: The AssemblyLine