Hello hello again,

so I am trying to cook something again and obviously I am failing.

I have a mutlivalued attribute in eDirectory and I need to store a part
from each value into a single valued attribute.

Example:
Attribute A
- value1: 001-I
- value2: 002-D
- value3: 003-M

I need the I and the D and the M and store in a single valued attribute
Attribute B
-value: IDM

I managed to query the destination user to get the attribute I want from
the user ... WOHOO :-)
Yet everythin after fails

Here is what I cooked up:

<actions>
<do-set-local-variable name="VAR_DN" scope="policy">
<arg-string>
<token-dest-dn/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="VAR_RESULT" scope="policy">
<arg-node-set>
<token-xpath expression="query:search($destQueryProcessor,
'user','',$VAR_DN, 'User', '','', 'ROCEcrebo')"/>
</arg-node-set>
</do-set-local-variable>
<do-for-each>
<arg-node-set>
<token-xpath
expression='$VAR_RESULT/attr[@attr-name="ROCECrebo"]/value'/>
</arg-node-set>
<arg-actions>
<do-set-local-variable name="VAR_STATUS_TEMP" scope="policy">
<arg-string>
<token-xpath
expression="substring-after($VAR_RESULT/attr[@attr-name=&quot;ROCECrebo&quot;]/value,&apos;-&apos"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="VAR_STATUS_TEMP2" scope="policy">
<arg-string>
<token-xpath
expression="concat($VAR_STATUS_TEMP2,$VAR_STATUS_T EMP)"/>
</arg-string>
</do-set-local-variable>
<do-trace-message level="0">
<arg-string>
<token-text xml:space="preserve">BLA BLA BLA </token-text>
<token-local-variable name="VAR_STATUS_TEMP2"/>
</arg-string>
</do-trace-message>
</arg-actions>
</do-for-each>
<do-veto/>
</actions>


This is the trace result:
01/22/08 20:21:58.178]:HR_CSV PT:Applying command transformation policies.
[01/22/08 20:21:58.179]:HR_CSV PT:Applying policy: %+C%14CTEST%-C.
[01/22/08 20:21:58.180]:HR_CSV PT: Applying to modify #1.
[01/22/08 20:21:58.180]:HR_CSV PT: Evaluating selection criteria for
rule 'TEST'.
[01/22/08 20:21:58.183]:HR_CSV PT: (if-op-attr 'ROCEcrebo'
available) = TRUE.
[01/22/08 20:21:58.183]:HR_CSV PT: Rule selected.
[01/22/08 20:21:58.184]:HR_CSV PT: Applying rule 'TEST'.
[01/22/08 20:21:58.184]:HR_CSV PT: Action:
do-set-local-variable("VAR_DN",scope="policy",token-dest-dn()).
[01/22/08 20:21:58.184]:HR_CSV PT: arg-string(token-dest-dn())
[01/22/08 20:21:58.186]:HR_CSV PT: token-dest-dn()
[01/22/08 20:21:58.187]:HR_CSV PT: Token Value:
"\EDIR_001\novell\IDM\ROCE\PS100011".
[01/22/08 20:21:58.188]:HR_CSV PT: Arg Value:
"\EDIR_001\novell\IDM\ROCE\PS100011".
[01/22/08 20:21:58.188]:HR_CSV PT: Action:
do-set-local-variable("VAR_RESULT",scope="policy",arg-node-set(token-xpath("query:search($destQueryProcessor,
'user','',$VAR_DN, 'User', '','', 'ROCEcrebo')"))).
[01/22/08 20:21:58.191]:HR_CSV PT:
arg-node-set(token-xpath("query:search($destQueryProcessor,
'user','',$VAR_DN, 'User', '','', 'ROCEcrebo')"))
[01/22/08 20:21:58.192]:HR_CSV PT:
token-xpath("query:search($destQueryProcessor, 'user','',$VAR_DN,
'User', '','', 'ROCEcrebo')")
[01/22/08 20:21:58.194]:HR_CSV PT: Query from policy
[01/22/08 20:21:58.194]:HR_CSV PT:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.5.1.20070411 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<query class-name="User"
dest-dn="\EDIR_001\novell\IDM\ROCE\PS100011" scope="user">
<search-class class-name="User"/>
<read-attr attr-name="ROCEcrebo"/>
</query>
</input>
</nds>
[01/22/08 20:21:58.199]:HR_CSV PT: Pumping XDS to eDirectory.
[01/22/08 20:21:58.199]:HR_CSV PT: Performing operation query
for \EDIR_001\novell\IDM\ROCE\PS100011.
[01/22/08 20:21:58.204]:HR_CSV PT: Query from policy result
[01/22/08 20:21:58.206]:HR_CSV PT:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.5.1.20070411 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<instance class-name="User" event-id="0"
qualified-src-dn="O=novell\OU=IDM\OU=ROCE\CN=PS100011"
src-dn="\EDIR_001\novell\IDM\ROCE\PS100011" src-entry-id="33472">
<association state="associated"></association>
<attr attr-name="ROCEcrebo">
<value timestamp="1201028721#15" type="string">001-I</value>
<value timestamp="1201029408#6" type="string">003-M</value>
<value timestamp="1201029408#7" type="string">002-D</value>
</attr>
</instance>
<status event-id="0" level="success"></status>
</output>
</nds>
[01/22/08 20:21:58.214]:HR_CSV PT: Token Value: {<instance>
@class-name = "User" @event-id = "0" @qualified-src-dn =
"O=novell\OU=IDM\OU=ROCE\CN=PS100011" @src-dn =
"\EDIR_001\novell\IDM\ROCE\PS100011" @src-entry-id = "33472"}.
[01/22/08 20:21:58.216]:HR_CSV PT: Arg Value: {<instance>
@class-name = "User" @event-id = "0" @qualified-src-dn =
"O=novell\OU=IDM\OU=ROCE\CN=PS100011" @src-dn =
"\EDIR_001\novell\IDM\ROCE\PS100011" @src-entry-id = "33472"}.
[01/22/08 20:21:58.219]:HR_CSV PT: Action:
do-for-each(arg-node-set(token-xpath("$VAR_RESULT/attr[@attr-name="ROCECrebo"]/value"))).
[01/22/08 20:21:58.219]:HR_CSV PT:
arg-node-set(token-xpath("$VAR_RESULT/attr[@attr-name="ROCECrebo"]/value"))
[01/22/08 20:21:58.220]:HR_CSV PT:
token-xpath("$VAR_RESULT/attr[@attr-name="ROCECrebo"]/value")
[01/22/08 20:21:58.222]:HR_CSV PT: Token Value: {}.
[01/22/08 20:21:58.222]:HR_CSV PT: Arg Value: {}.
[01/22/08 20:21:58.223]:HR_CSV PT: Action: do-veto().
[01/22/08 20:21:58.224]:HR_CSV PT:Policy returned:
[01/22/08 20:21:58.224]:HR_CSV PT:


TIps and hints are highly appreciated!

Cheers,
Londo