Hi,

I am in a weird situation where I am writing a Query which selects multiple users and creating multiple driver-operation-data but the problem is when it reaches Output-transformation-policy(otp) it is having just one src-dn i.e. the last one.

Below is the snippet of code.

Is it feasible to do this way?

<do-for-each>
<arg-node-set>
<token-query class-name="User" datastore="src" scope="subtree">
<arg-match-attr name="mailbox">
<arg-value type="string">
<token-text xml:space="preserve">*</token-text>
</arg-value>
</arg-match-attr>
</token-query>
</arg-node-set>
<arg-actions>

<do-set-op-src-dn>
<arg-dn>
<token-parse-dn start="0">
<token-xpath expression="$current-node/@src-dn"/>
</token-parse-dn>
</arg-dn>
</do-set-op-src-dn>
<do-add-association when="after">
<arg-dn>
<token-src-dn/>
</arg-dn>
<arg-association>
<token-src-attr name="CN"/>
</arg-association>
</do-add-association>

<do-if>
<arg-conditions>
<and>

<if-src-attr name="mailbox" op="available"/>
</and>
</arg-conditions>
<arg-actions>

<arg-actions>
<do-set-local-variable name="applicationContent" notrace="true" scope="policy">
<arg-string>
<token-text xml:space="preserve">Some xml Content</token-text>
</arg-string>
</do-set-local-variable>
</arg-actions>
</do-if>
<do-if>

<arg-actions>
<do-append-xml-element expression=".." name="driver-operation-data"/>
<do-set-xml-attr expression="../driver-operation-data" name="src-dn">
<arg-string>
<token-src-dn/>
</arg-string>
</do-set-xml-attr>
<do-if>
<arg-conditions>
<and>
<if-password op="available"/>
</and>
</arg-conditions>
<arg-actions>
<do-set-xml-attr expression="../driver-operation-data[last()]" name="is-sensitive">
<arg-string>
<token-text xml:space="preserve">true</token-text>
</arg-string>
</do-set-xml-attr>
</arg-actions>
<arg-actions/>
</do-if>
<do-set-xml-attr expression="../driver-operation-data[last()]" name="class-name">
<arg-string>
<token-text xml:space="preserve">User</token-text>
</arg-string>
</do-set-xml-attr>
<do-set-xml-attr expression="../driver-operation-data[last()]" name="event-id">
<arg-string>
<token-xpath expression="$current-op/@event-id"/>
</arg-string>
</do-set-xml-attr>
<do-if>
<arg-conditions>
<and>
<if-operation mode="nocase" op="equal">modify-password</if-operation>
</and>
</arg-conditions>

<do-set-xml-attr expression="../driver-operation-data[last()]/request[last()]" name="url">
<arg-string>
<token-text xml:space="preserve">http:xyz.com</token-text>
</arg-string>
</do-set-xml-attr>
<do-set-xml-attr expression="../driver-operation-data[last()]/request[last()]" name="method">
<arg-string>
<token-text xml:space="preserve">PUT</token-text>
</arg-string>
</do-set-xml-attr>
<do-append-xml-element expression="../driver-operation-data[last()]/request[last()]" name="url-token"/>
</arg-actions>
<arg-actions/>
</do-if>
<do-append-xml-element expression="../driver-operation-data[last()]/request[last()]" name="header"/>
<do-set-xml-attr expression="../driver-operation-data[last()]/request[last()]/header" name="content-type">
<arg-string>
<token-text xml:space="preserve">application/xml</token-text>
</arg-string>
</do-set-xml-attr>

<do-append-xml-element expression="../driver-operation-data[last()]/request[last()]" name="data"/>
<do-append-xml-element expression="../driver-operation-data[last()]/request[last()]" name="value"/>
<do-append-xml-text expression="../driver-operation-data[last()]/request[last()]/value" notrace="true">
<arg-string>
<token-local-variable name="applicationContent"/>
</arg-string>
</do-append-xml-text>
<do-clone-xpath before="." dest-expression="../driver-operation-data[last()]" src-expression="$current-op/operation-data"/>
<do-set-local-variable name="applicationContent" scope="policy">
<arg-string>
<token-text notrace="true" xml:space="preserve"/>
</arg-string>
</do-set-local-variable>
<do-strip-xpath expression="$current-node"/>
</arg-actions>
<arg-actions/>
</do-if>
</arg-actions>
<arg-actions/>
</do-if>
</arg-actions>