Synching One Source to Two Destinations in the Same Tree



By: coolguys

October 11, 2006 12:00 am

Reads: 253

Comments:0

Rating:0

Problem

A Forum reader described the following situation:

“I want to sync one source to two destinations in the same tree, going one way, with one DirXML driver.

It’s my understanding that the placement stylesheet contains only one dest-dn attribute that can be used to set one destination. How can I set 2 destinations in a placement stylesheet, or should that stylesheet have a new event to create another one?”

For example, \tree\O\srcDept\user1 would sync to
\tree\O\destDept\subDept1\user1 and
\tree\O\destDept\subDept2\user1 …”

And here’s some advice from Father Ramon …

Solution

The way that is least likely to cause you problems is to use two drivers (or two sets of drivers in the case of an eDir-eDir connection).

You could also do something like this:

do-set-dest-dn(\tree\O\destDept\subDept2\user1)
do-clone-xpath(".", "..")
do-set-dest-dn(\tree\O\destDept\subDept1\user1)

It could also be done in a stylesheet, but exactly how would depend on the structure of your existing stylesheet. The basic idea is that you have to create another add that is a copy of the original and give it a different dest-dn. I would expect the template to look something like this:

<xsl:template match="add[@class-name="User]">
  <xsl:copy>
   <xsl:apply-templates select="@*"/>
    <xsl:attribute name="dest-dn">
     <!-- some code to generate and output the first dn ->
    </xsl:attribute>
   <xsl:apply-templates select="node()"/>
  </xsl:copy>
  <xsl:copy>
   <xsl:apply-templates select="@*"/>
    <xsl:attribute name="dest-dn">
     <!-- some code to generate and output the second dn ->
    </xsl:attribute>
   <xsl:apply-templates select="node()"/>
  </xsl:copy>
</xsl:template>
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Tags: , ,
Categories: Identity Manager, Technical Solutions

Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment.  It just worked for at least one person, and perhaps it will be useful for you too.  Be sure to test in a non-production environment.

Comment