I've got a SOAP driver that I need to send all the users entitlement
values. I've got everything working and when I add a single entitlement
the rule works fine. When I add multiple entitlement values, it winds
up creating duplicates for each of the entitlements. Below is the
excerpt of my rule along with what the output looks like. Any help
would be much appreciated!!

<arg-actions>
<do-set-local-variable name="lvarEntitlements" scope="policy">
<arg-node-set>
<token-attr name="DirXML-EntitlementRef"/>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="lvarCoreDeptEntitlement"
scope="policy">
<arg-string>
<token-text xml:space="preserve">\VAULT\services\Test SIM Driver
Set\APP SOAP\depts</token-text>
</arg-string>
</do-set-local-variable>
<do-for-each>
<arg-node-set>
<token-local-variable name="lvarEntitlements"/>
</arg-node-set>
<arg-actions>
<do-trace-message level="3">
<arg-string>
<token-text xml:space="preserve">Entitlement References:
</token-text>
<token-local-variable name="current-node"/>
</arg-string>
</do-trace-message>
<do-if>
<arg-conditions>
<and>
<if-xpath
op="true">$current-node/component[@name='volume']/text()=$lvarCoreDeptEntitlement</if-xpath>
<if-xpath
op="true">$current-node/component[@name='nameSpace']/text()!=0</if-xpath>
</and>
</arg-conditions>
<arg-actions>
<do-set-local-variable name="lvarEntitlementParam"
scope="policy">
<arg-string>
<token-xpath
expression="$current-node/component/ref/param/text()"/>
</arg-string>
</do-set-local-variable>
<do-trace-message level="3">
<arg-string>
<token-text xml:space="preserve">Current Node Dept Value -
</token-text>
<token-local-variable name="lvarEntitlementParam"/>
</arg-string>
</do-trace-message>
<do-add-dest-attr-value name="departments">
<arg-value type="string">
<token-local-variable name="lvarEntitlementParam"/>
</arg-value>
</do-add-dest-attr-value>
</arg-actions>
<arg-actions/>
</do-if>
</arg-actions>
</do-for-each>
</arg-actions>

Output:


<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">CONFIG_ADMIN</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">CRMEMO_20K_APPROVER</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">SUPPORT</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">RTS</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">PRODUCTION</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">PERM_EMPLOYEE_HR</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">MARKETING</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">HR</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">PERM_EMPLOYEE_EDIT</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">CRMEMO_APPROVER</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">SUPPORT_SUPERVISOR</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">SYSTEM_USER</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">XMLRPC_PASSWORD</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">VIRT_PRODUCTION</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">BILLING</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">CHURN_AUDIT</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">AUP</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">CONFIG_ADMIN</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">CRMEMO_20K_APPROVER</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">SUPPORT</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">RTS</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">PRODUCTION</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">PERM_EMPLOYEE_HR</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">MARKETING</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">HR</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">PERM_EMPLOYEE_EDIT</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">CRMEMO_APPROVER</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">SUPPORT_SUPERVISOR</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">SYSTEM_USER</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">XMLRPC_PASSWORD</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">VIRT_PRODUCTION</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">BILLING</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">CHURN_AUDIT</value>
</add-value>
</modify-attr>
<modify-attr attr-name="departments">
<remove-all-values/>
<add-value>
<value type="string">AUP</value>
</add-value>
</modify-attr>


--
jkinney
------------------------------------------------------------------------
jkinney's Profile: http://forums.novell.com/member.php?userid=140
View this thread: http://forums.novell.com/showthread.php?t=419980