Blogs

SOBRE ESTE BLOG

Welcome to the Process Automation Blog, where you can read the perspectives from BSM experts. This Blog provides insights into the Process Automation solution, as well as technical details about specific IBM products.

Links

TWEETS RECENTES

Using a Custom Class to Link CIs to Actual CIs in SmartCloud Control Desk

The Link to Actual CIs action in the
Configuration Items application uses naming rules that rely on attribute
values and relationships to find actual and authorized CIs that
represent the same thing. You can modify the naming rules to change
which attributes and relationships are used to link each type of CI. But
sometimes that isn't enough for the linking engine to link your CIs.

For example, sometimes an attribute value on the authorized
Configuration Item has a different format from the value on the actual
Configuration Item, and the values need to be normalized before they can
be compared. Suppose your authorized CI has an attribute value of 1 for
the attribute OPERATINGSYSTEM_OSVERSION, whereas the attribute value of
that attribute on the actual Configuration Item is 1.0. By default, the
linking engine does not consider those equal, but you want them to
match.

To solve these kinds of problems, you can write your own custom Java class to change the behavior of the comparison.

The naming rule that you are customizing must be a naming rule that
matches an attribute, rather than a relationship. This means that the
naming rule attempts to match the value of the attribute with the
specified Attribute Name on the CI with the value of the same named
attribute on an actual CI. By default, two values are considered to
match if the attribute exists on both and the values are equal, ignoring
the case of the values.

You can change that behavior by
writing a Java class that implements the interface
com.ibm.ism.cci.app.namerules.NmrComparisonClassInterface. This
interface has a single method that has to be implemented:

The first parameter on the method is a String representation of the CI
attribute value, regardless of whether the attribute is an alphanumeric
or numeric attribute.

The second parameter is a String representation of the actual CI attribute value.

The
third parameter is an optional string that is passed to the method
during the comparison if there is a value specified in the Naming Rule Comparison Parameter field of the naming rule.

The method should return true if the CI attribute value matches the actual CI attribute value, and false otherwise.

Note that if the attribute doesn't exist on the CI or actual CI, the
value passed to this method is <NO CISPEC>; and if the attribute
exists but has an empty or null value, the value passed to this method is
<NO SPEC VAL>.

After you compile this method, you need to
rebuild and re-deploy the application EAR file and restart the
application to make the class available to the linking engine.

Then you need to use the Integration Framework to add or update any
naming rules that you want to use this new class. Specifically, you need
to set the NMRCOMPARECLASS to the fully qualified name of this class on
the NMRATTR of any attributes where you want this class to be used.

You can view the new naming rules by going to the Configuration Items application and selecting the View Naming Rules action. It is recommended that you use preview mode to try your new rules before doing any actual linking.