Input Transformation: Names and Titles

Absent Member.
Absent Member.
0 3 4,197
0 Likes
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>
...




















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.
Tags (2)
3 Comments
Absent Member.
Absent Member.
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!
Absent Member.
Absent Member.
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!
Absent Member.
Absent Member.
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
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.