Blog Entry
502
In a recent Identity Management project I found myself reading information from an HR system via JDBC, then needing to write it into the Identity Vault. From there it would disperse to other systems, one of which was GroupWise.
The HR system stored all information in a capitalised fashion. It's quite obviously undesirable for all entries in a GroupWise address book to be capitalised, so I needed to transform the data.
I wrote two ECMAScript functions to handle this.
The two scripts were added to the Driver Set Library and added to the JDBC Driver's configuration.
In an input transformation policy, the following rules were added. Only two example rules have been added here for the sake of brevity. Obviously if you use them you would need to adjust the class and attribute names.
<rule> <description>Capitalise SURNAME correctly</description> <conditions> <and> <if-class-name mode="nocase" op="equal">IDM_EMPLIST</if-class-name> <if-op-attr name="SURNAME" op="available"/> </and> </conditions> <actions> <do-reformat-op-attr name="SURNAME"> <arg-value> <token-xpath expression="es:nameCapitalise($current-value)"/> </arg-value> </do-reformat-op-attr> </actions> </rule> <rule> <description>Capitalise POS_TITLE correctly</description> <conditions> <and> <if-class-name mode="nocase" op="equal">IDM_EMPLIST</if-class-name> <if-op-attr name="POS_TITLE" op="available"/> </and> </conditions> <actions> <do-reformat-op-attr name="POS_TITLE"> <arg-value> <token-xpath expression="es:toTitleCase($current-value)"/> </arg-value> </do-reformat-op-attr> </actions> </rule>
I hope that the scripts (being in the wiki) will be contributed to over time to make them more robust and to cater for more situations.
Related Articles
User Comments
Scripts in the Wiki
Submitted by geoffc on 21 October 2009 - 6:18am.
I hate editing the Wiki, so I just added a link to my article, Open Call for ECMA functions in IDM to the bottom of it. I suppose I should do the converse and add a link in my article to the Wiki as well. Complete the reciprocal mapping. Dang it, the engine is supposed to do that for us in 3.6.
I like your two functions though!
- Login to post comments






1