Policy example for Association Problems when Updating the i5os Bidirectional Driver to IDM 3.5

0 Likes

Problem



As noted in the Cool Solutions tip at http://www.novell.com/coolsolutions/tip/19301.html, there was a bug in the driver concerning association values that was fixed in the 2.0 version set. This has serious consequences in an upgrade situation. The problem arises when you have uppercase association values (which probably all your values are) during an upgrade.



Here's a sample policy fix from Cool Solutions reader Jeff Bate ...



Solution



This policy will change all the associations to lowercase if you put it in the Subscriber Event Transformation on the driver and then do a Synchronize from iManager.



<?xml version="1.0" encoding="UTF-8"?>
<policy
xmlns:jstring="http://www.novell.com/nxsl/java/java.lang.String">
<rule>
<description>Set variables</description>
  <conditions>
    <and>
      <if-operation op="equal">sync</if-operation>
    </and>
  </conditions>
  <actions>
    <do-set-local-variable name="oldAssociation">
      <arg-string>
        <token-association/>
      </arg-string>
    </do-set-local-variable>
    <do-set-local-variable name="newAssociation">
      <arg-string>
        <token-lower-case>
          <token-association/>
        </token-lower-case>
      </arg-string>
    </do-set-local-variable>
  </actions>
</rule>
<rule>
<description>Modify Association</description>
  <conditions>
    <and>
      <if-operation op="equal">sync</if-operation>
<if-xpath op="not-true">jstring:equals($newAssociation,
$oldAssociation)</if-xpath>
    </and>
  </conditions>
  <actions>
    <do-remove-association>
      <arg-association>
        <token-local-variable name="oldAssociation"/>
      </arg-association>
    </do-remove-association>
    <do-add-association>
      <arg-association>
        <token-local-variable name="newAssociation"/>
      </arg-association>
    </do-add-association>
  </actions>
</rule>
</policy>

Labels:

How To-Best Practice
Comment List
Related
Recommended