I'm trying to know how many values are in a multi-values attribute.

I want to set a local variable for each value and then check if the
value is empty or no, but the problem is that the variable takes only
the first value and then I'm unable to parse the content of the
attribute.

See the trace here :

<modify cached-time="20120223110124.693Z" class-name="hessoPeople"
event-id="heg-49#20120223110124#1#1"
qualified-src-dn="O=hesge\OU=people\OU=courant\CN=idm6test6"
src-dn="\HESGE-TREE-DEV\hesge\people\c
ourant\idm6test6" src-entry-id="64187" timestamp="1329994884#2">
<modify-attr attr-name="Title">
<remove-value>
<value timestamp="1329994631#2"
type="string">also123</value>
</remove-value>
<add-value>
<value timestamp="1329994884#2"
type="string">also1234</value>
</add-value>
</modify-attr>
</modify>
</input>
</nds>
[02/23/12 12:01:24.822]:hesgePeopleLoopBack ST:Applying event
transformation policies.
[02/23/12 12:01:24.822]:hesgePeopleLoopBack ST:Applying policy:
%+C%14CGestion contrats%-C.
[02/23/12 12:01:24.822]:hesgePeopleLoopBack ST: Applying to modify
#1.
[02/23/12 12:01:24.822]:hesgePeopleLoopBack ST: Evaluating selection
criteria for rule 'Get contract cn'.
[02/23/12 12:01:24.823]:hesgePeopleLoopBack ST: (if-class-name
equal "hessoPeople") = TRUE.
[02/23/12 12:01:24.823]:hesgePeopleLoopBack ST: (if-op-attr
'Title' changing) = TRUE.
[02/23/12 12:01:24.823]:hesgePeopleLoopBack ST: Rule selected.
[02/23/12 12:01:24.823]:hesgePeopleLoopBack ST: Applying rule 'Get
contract cn'.
[02/23/12 12:01:24.823]:hesgePeopleLoopBack ST: Action:
do-set-local-variable("ContractCN2",scope="policy",token-attr("See
Also")).
[02/23/12 12:01:24.824]:hesgePeopleLoopBack ST:
arg-string(token-attr("See Also"))
[02/23/12 12:01:24.824]:hesgePeopleLoopBack ST:
token-attr("See Also")
[02/23/12 12:01:24.824]:hesgePeopleLoopBack ST: Query from
policy
[02/23/12 12:01:24.824]:hesgePeopleLoopBack ST:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.6.10.4747">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<query class-name="hessoPeople"
dest-dn="\HESGE-TREE-DEV\hesge\people\courant\idm6test6"
dest-entry-id="64187" scope="entry">
<read-attr attr-name="See Also"/>
</query>
</input>
</nds>
[02/23/12 12:01:24.825]:hesgePeopleLoopBack ST: Pumping XDS
to eDirectory.
[02/23/12 12:01:24.825]:hesgePeopleLoopBack ST: Performing
operation query for \HESGE-TREE-DEV\hesge\people\courant\idm6test6.
[02/23/12 12:01:24.827]:hesgePeopleLoopBack ST: Query from
policy result
[02/23/12 12:01:24.827]:hesgePeopleLoopBack ST:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.6.10.4747">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<instance class-name="hessoPeople"
qualified-src-dn="O=hesge\OU=people\OU=courant\CN=idm6test6"
src-dn="\HESGE-TREE-DEV\hesge\people\courant\idm6test6"
src-entry-id="64187">
<attr attr-name="See Also">
<value timestamp="1329990394#1"
type="dn">\HESGE-TREE-DEV\hesge\people\contrat\1000654981-1503619499</value>
<value timestamp="1329990759#1"
type="dn">\HESGE-TREE-DEV\hesge\people\contrat\100075208-2062114182</value>
</attr>
</instance>
<status level="success"></status>
</output>
</nds>
[02/23/12 12:01:24.829]:hesgePeopleLoopBack ST: Token Value:
"\HESGE-TREE-DEV\hesge\people\contrat\1000654981-1503619499".
[02/23/12 12:01:24.829]:hesgePeopleLoopBack ST: Arg Value:
"\HESGE-TREE-DEV\hesge\people\contrat\1000654981-1503619499".
[02/23/12 12:01:24.829]:hesgePeopleLoopBack ST:Policy returned:
[02/23/12 12:01:24.829]:hesgePeopleLoopBack ST:


Is there any other way to do this ?


Any help welcome.

Thanks

Sylvain


--
sma
------------------------------------------------------------------------
sma's Profile: http://forums.novell.com/member.php?userid=22076
View this thread: http://forums.novell.com/showthread.php?t=452559