Input Transformation: Names and Titles

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.
Anonymous
  • To convert french caracter:

    Use the following xpath

    Var is the string you want to convert

    translate($VAR,$Source,$Destination)

    With these 2 GCVs
    Source:ÀÁÂÃÄÇÈÉÊËÌÍÎÏÑÒÓÔÕÖÙÚÛÜàáâãäçèéêëìíîïñòóôõöùúûü
    Destination:AAAAACEEEEIIIINOOOOOUUUUaaaaaceeeeiiiinooooouuuu

    I put those string in a GCV just in case I need to add other caracter in the future
  • How about this issue

    I am trying to reformat the attribut 'givenName' from the identity Vault to Active directory server.

    I use the ECMAScript to reformat the attribut and replace 'é, ê , è' with 'e'
    I developped the function reformat() that do the following

    attribut.replace(/(é)|(ê)|(è)/g, "e");

    The function works fine.

    The problem is when I deploy the whole project, for example if I have givenName='éééééééé' in the identity vault, it will be transmitted within the subscriber as '���...' or '□□□□...', so when applying the reformatting, the script could not detect the chars 'é, ê , è' and in the destination (Active directory) the givenName stay unchanged ='éééééééé'

    I know its a pure encoding issue, but I dont see how to fix this issue

    Please reply!
  • 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!