IBM Support

How to set a default value to a customized field in VMMSYNC's usermapping

Technical Blog Post


Abstract

How to set a default value to a customized field in VMMSYNC's usermapping

Body

When users are synchronized from different domains, you want to have a customized field keep information where users are came from.

 

In order to achieve this requirement,

1. need to separate VMMSYNC crontask instance.

For,  one to synchronize users from A domain, the other to synchronize users from B domain.

 

2.  Create a customized field in PERSON object

- Go to the Database Configuration application.

- Open PERSON object

- Create the attribute named  'SOURCEDOMAIN'  having ALN(10) Type.

- Apply Database changes accordingly.

 

3. Open each VMMSYNC crontask instance's usermapping XML

- Add  new line for PERSON table section.

In usermapping of the VMMSYNC crontask instance for A domain, 

<column name="SOURCEDOMAIN" type="ALN" required="true" >{FROM_A}</column>

In usermapping of the VMMSYNC crontask instance for B domain, 

<column name="SOURCEDOMAIN" type="ALN" required="true" >{FROM_B}</column>

 

** If required ="true" is not added,  only data will be inserted at the first time not updated.

 

ex)

<table name="PERSON">   
<keycolumn name="PERSONID" type="UPPER">uid</keycolumn>
<column name="FIRSTNAME" type="ALN">givenName</column>
<column name="LASTNAME" type="ALN">sn</column>
<column name="DISPLAYNAME" type="ALN">displayName</column>
~~
<column name="COUNTRY" type="ALN">c</column>
<column name="SOURCEDOMAIN" type="ALN">{FROM_A}</column>
</table>

 

Then, SOURCEDOMAIN attribute will keep information where users are came from.

[{"Business Unit":{"code":"BU055","label":"Cognitive Applications"},"Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11132143