Hi,

Thanks a lot for taking the time to read and hopefully respond to this.

Admittedly I'm a nodeset-noob, working off of a very limited
understanding of how node sets work and based largely on trying to
understand examples in this forum and Cool Solutions.

I'm trying to create multiple groups from multi-valued variables, when
multiple values exist. My rules work fine with the first value, but I
can't get my nodeset policy to read and create off the second value or
more.

So, for example, I have the following attribute:

<attr attr-name="ERP-prog">
<value type="string">GRAD</value>
<value type="string">UNDG</value>
</attr>

I'm assuming I can't evaluate attributes using a nodeset, so I attempt
write these values to a local variable:

<actions>
<do-set-local-variable name="student-erp-prog" scope="policy">
<arg-node-set>
<token-op-attr name="ERP-prog"/>
</arg-node-set>
</do-set-local-variable>
<do-for-each>
<arg-node-set>
<token-local-variable name="student-erp-prog"/>
</arg-node-set>
<arg-actions>
<do-set-local-variable name="student-group-dn" scope="policy">
<arg-string>
<token-global-variable name="idv.dit.data.groups"/>
<token-text xml:space="preserve">\</token-text>
<token-text xml:space="preserve">dotcms_</token-text>
<token-attr name="ERP-prog"/>
</arg-string>
</do-set-local-variable>
</arg-actions>
</do-for-each>
<do-set-local-variable disabled="true" name="student-group-dn"
scope="policy">
<arg-string>
<token-global-variable name="idv.dit.data.groups"/>
<token-text xml:space="preserve">\</token-text>
<token-text xml:space="preserve">dotcms_</token-text>
<token-attr name="ERP-prog"/>
</arg-string>
</do-set-local-variable>

I see the first value getting written, but nothing more:

http://pastebin.com/7AyvxVZC

This is the complete rule (one of a few to create the group(s)):

<rule>
<description>Set local variables to test existence of program groups
and for placement</description>
<conditions>
<or>
<if-operation op="equal">add</if-operation>
<if-operation op="equal">modify</if-operation>
</or>
</conditions>
<actions>
<do-set-local-variable name="student-erp-prog" scope="policy">
<arg-node-set>
<token-op-attr name="ERP-prog"/>
</arg-node-set>
</do-set-local-variable>
<do-for-each>
<arg-node-set>
<token-local-variable name="student-erp-prog"/>
</arg-node-set>
<arg-actions>
<do-set-local-variable name="student-group-dn" scope="policy">
<arg-string>
<token-global-variable name="idv.dit.data.groups"/>
<token-text xml:space="preserve">\</token-text>
<token-text xml:space="preserve">dotcms_</token-text>
<token-attr name="ERP-prog"/>
</arg-string>
</do-set-local-variable>
</arg-actions>
</do-for-each>
<do-set-local-variable disabled="true" name="student-group-dn"
scope="policy">
<arg-string>
<token-global-variable name="idv.dit.data.groups"/>
<token-text xml:space="preserve">\</token-text>
<token-text xml:space="preserve">dotcms_</token-text>
<token-attr name="ERP-prog"/>
</arg-string>
</do-set-local-variable>
<do-for-each>
<arg-node-set>
<token-local-variable name="student-erp-prog"/>
</arg-node-set>
<arg-actions>
<do-set-local-variable name="student-group-info" scope="policy">
<arg-string>
<token-dest-attr name="Object Class">
<arg-dn>
<token-local-variable name="student-group-dn"/>
</arg-dn>
</token-dest-attr>
</arg-string>
</do-set-local-variable>
</arg-actions>
</do-for-each>
<do-set-local-variable disabled="true" name="student-group-info"
scope="policy">
<arg-string>
<token-dest-attr name="Object Class">
<arg-dn>
<token-local-variable name="student-group-dn"/>
</arg-dn>
</token-dest-attr>
</arg-string>
</do-set-local-variable>
</actions>
</rule>

Thanks,

Bill


--
bscully
------------------------------------------------------------------------
bscully's Profile: https://forums.netiq.com/member.php?userid=355
View this thread: https://forums.netiq.com/showthread.php?t=46493