I'm trying to write a structured attribute into a local variable for
further processing of the attribute. I've never worked with sending a
multi-valued out from the IDM driver, only from an input. The policy
below is only outputting one value, with all of the other values getting
Invalid data.

Any suggestions on how I can write the value out into the local
variable? There should always be exactly 3 of the attributes being
sent.



Policy


<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE policy PUBLIC
"policy-builder-dtd" "C:\Program Files
(x86)\Novell\Designer\plugins\com.novell.idm.polic ybuilder_4.0.0.201210161153\DTD\dirxmlscript4.0.2. dtd"><policy
xmlns:es="http://www.novell.com/nxsl/ecmascript"
xmlns:QNAEnc="http://www.novell.com/nxsl/java/companyQnA.QNAEncrypt">
<rule>
<description>Copy Attribute into the Local Variable</description>
<comment xml:space="preserve">Copy Attribute into the Local
Variable</comment>
<conditions>
<and>
<if-class-name op="equal">User</if-class-name>
<if-src-attr mode="regex" name="QNAChallengesResponses"
op="equal">.+</if-src-attr>
</and>
</conditions>
<actions>
<do-for-each>
<arg-node-set>
<token-src-attr name="QNAChallengesResponses"/>
</arg-node-set>
<arg-actions>
<do-set-local-variable name="lven-QNA" scope="policy">
<arg-string>
<token-local-variable name="current-node"/>
</arg-string>
</do-set-local-variable>
</arg-actions>
</do-for-each>
</actions>
</rule>
<rule>
<description>companyQnA Function Calls</description>
<comment xml:space="preserve">Decrypt and Encrypt the
QNAChallengesResponses attributes using the QNAcipherkey.</comment>
<conditions>
<and>
<if-attr name="QNAChallengesResponses" op="available"/>
</and>
</conditions>
<actions>
<do-set-local-variable name="lven-QNA" scope="policy">
<arg-string>
<token-attr name="QNAChallengesResponses"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="lvQNAcipherkey" scope="policy">
<arg-string>
<token-attr name="QNACipherKey"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="lvEncryptQNA" scope="policy">
<arg-string>
<token-xpath
expression="QNAEnc:encryptQnA($lven-QNA,$lvQNAcipherkey)"/>
</arg-string>
</do-set-local-variable>
<do-reformat-op-attr name="QNAChallengesResponses">
<arg-value type="string">
<token-local-variable name="lvEncryptQNA"/>
</arg-value>
</do-reformat-op-attr>
</actions>
</rule>
</policy>


Thanks


--
el_triad
------------------------------------------------------------------------
el_triad's Profile: https://forums.netiq.com/member.php?userid=1777
View this thread: https://forums.netiq.com/showthread.php?t=46872