Okay, I am getting up to 99 attributes from my application that need to
be mapped to a single multi-valued attribute in eDirectory, and all
attributes are sent with every transactions. So, I would get something
like:

<add class-name="user">
<add-attr attr-name="ALTEMAIL01">
<value type="string">ALTEMAIL01</value>
</add-attr>
<add-attr attr-name="ALTEMAIL02">
<value type="string">ALTEMAIL02</value>
</add-attr>
<add-attr attr-name="ALTEMAIL03">
<value type="string">ALTEMAIL03</value>
</add-attr>
<add-attr attr-name="ALTEMAIL04">
<value type="string">ALTEMAIL04</value>
</add-attr>
<add-attr attr-name="ALTEMAIL05">
<value type="string">ALTEMAIL05</value>
</add-attr>

....

<add-attr attr-name="ALTEMAIL99">
<value type="string">ALTEMAIL99</value>
</add-attr>
</add>

Now, all 99 attributes need to go into a single aux eDirectory
attributes of ALTEMAIL. Just because I get three values, does not mean
the values would be in the attributes ALTEMAIL01, ALTEMAIL02, and
ALTEMAIL03, they could be in ALTEMAIL21, ALTEMAIL55, and ALTEMAIL89.

I know the best place to do this would be the input transformation, and
if it was only 5-10 attributes I could do it in policy builder without
too much problem. With something like:

<rule>
<description>Join ALTEMAIL</description>
<comment xml:space="preserve">Values of ALTEMAIL01 - 05 should be
joined into a single attribute of ALTEMAIL</comment>
<conditions>
<or>
<if-op-attr name="ALTEMAIL01" op="available"/>
<if-op-attr name="ALTEMAIL02" op="available"/>
<if-op-attr name="ALTEMAIL03" op="available"/>
<if-op-attr name="ALTEMAIL04" op="available"/>
<if-op-attr name="ALTEMAIL05" op="available"/>
</or>
</conditions>
<actions>
<do-if>
<arg-conditions>
<and>
<if-op-attr mode="regex" name="ALTEMAIL01"
op="equal">.+</if-op-attr>
</and>
</arg-conditions>
<arg-actions>
<do-add-dest-attr-value name="ALTEMAIL">
<arg-value type="string">
<token-op-attr name="ALTEMAIL01"/>
</arg-value>
</do-add-dest-attr-value>
</arg-actions>
<arg-actions/>
</do-if>
<do-if>
<arg-conditions>
<and>
<if-op-attr mode="regex" name="ALTEMAIL02"
op="equal">.+</if-op-attr>
</and>
</arg-conditions>
<arg-actions>
<do-add-dest-attr-value name="ALTEMAIL">
<arg-value type="string">
<token-op-attr name="ALTEMAIL02"/>
</arg-value>
</do-add-dest-attr-value>
</arg-actions>
<arg-actions/>
</do-if>
<do-if>
<arg-conditions>
<and>
<if-op-attr mode="regex" name="ALTEMAIL03"
op="equal">.+</if-op-attr>
</and>
</arg-conditions>
<arg-actions>
<do-add-dest-attr-value name="ALTEMAIL">
<arg-value type="string">
<token-op-attr name="ALTEMAIL03"/>
</arg-value>
</do-add-dest-attr-value>
</arg-actions>
<arg-actions/>
</do-if>
<do-if>
<arg-conditions>
<and>
<if-op-attr mode="regex" name="ALTEMAIL04"
op="equal">.+</if-op-attr>
</and>
</arg-conditions>
<arg-actions>
<do-add-dest-attr-value name="ALTEMAIL">
<arg-value type="string">
<token-op-attr name="ALTEMAIL04"/>
</arg-value>
</do-add-dest-attr-value>
</arg-actions>
<arg-actions/>
</do-if>
<do-if>
<arg-conditions>
<and>
<if-op-attr mode="regex" name="ALTEMAIL05"
op="equal">.+</if-op-attr>
</and>
</arg-conditions>
<arg-actions>
<do-add-dest-attr-value name="ALTEMAIL">
<arg-value type="string">
<token-op-attr name="ALTEMAIL05"/>
</arg-value>
</do-add-dest-attr-value>
</arg-actions>
<arg-actions/>
</do-if>
</actions>
</rule>

However, when using 99 attributes, that code begins to look a bit
messing and slow. Anyone have any ideas on how to make the code faster
and look better?

Thanks,

Bob


--
bstumpp
------------------------------------------------------------------------
bstumpp's Profile: https://forums.netiq.com/member.php?userid=2783
View this thread: https://forums.netiq.com/showthread.php?t=49561