Article

Menkus's picture
article
Reads:

3938

Score:
5
5
1
 
Comments:

0

Adding the 'association-ref' Attribute to the 'value' Element with Policy Builder

Author Info

31 October 2008 - 1:07pm
Submitted by: Menkus

(View Disclaimer)

Introduction

When using the 'add source attribute value' action in the Input transform of an eDirectory driver, you get an event like this:


<nds dtdversion="3.5" ndsversion="8.x">
 <source>
   <product version="3.5.10.20070918 ">DirXML</product>
   <contact>Novell, Inc.</contact>
 </source>
 <input>
   <modify cached-time="20080822105006.309Z" class-name="blaGroup" dest-dn="BLA\Internal\WikiGroups\Wiki-Group01" dest-entry-id="64578" event-id="cds01#20080822105006#2#1" qualified-src-dn="O=BLA\OU=Internal\OU=Groups\OU=Active\CN=Wiki-Group01" src-dn="\BLA_IAM_DEV\BLA\Internal\Groups\Active\Wiki-Group01" src-entry-id="246993" timestamp="1219402206#1">
     <association state="associated">{B38F2F0F-E746-0c4c-928D-B38F2F0FE746}</association>
     <modify-attr attr-name="blaDelegate">
       <add-value>
         <value timestamp="1219402206#1" type="dn">\BLA_IAM_DEV\BLA\Internal\Identities\Active\LCLCST2001/value>
       </add-value>
     </modify-attr>
   </modify>
 </input>
</nds>

Which is then submitted to the connecting eDirectory driver. This event however will be filtered out due to a missing Association reference.

When the 'blaDelegate' attribute is modified through a normal Subscriber event the XML submitted to the connecting driver is the same except for the value element which looks like:


<value association-ref="{5C9A35F4-705C-c548-53BD-5C9A35F4705C}" timestamp="1219402206#1" type="dn">\BLA_IAM_DEV\BLA\Internal\Identities\Active\LCLCST2001</value>

The question is, how do you add the 'associaton-ref' attribute to the 'value' element using the policy builder? When the value of the association is known.

Solution

You can solve this problem with the following policy:


<do-set-xml-attr expression="../modify[@class-name='blaGroup']/modify-attr[@attr-name='blaDelegate']/add-value/value" name="association-ref">


Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

© 2013 Novell