After using IDM 3.5.1 and recently IDM 3.6, I have been able to do a lot
of things more easily then with IDM 3.0.1.

But now I am at a client using IDM 3.0.1, which does not include the
Query token. :-(
So back to the old school stuff, I have created a policy which should
return multiple instances. But it does not, instead it gives me an
error.

The actions I have defined:


Code:
--------------------
<actions>
<do-set-local-variable name="DEST-DN">
<arg-string>
<token-text xml:space="preserve">\idvault</token-text>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="SEARCH-VALUE">
<arg-string>
<token-text xml:space="preserve">cn=alan,ou=employees,ou=inact ive,o=idvault</token-text>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="lvQueryResult">
<arg-node-set>
<token-xpath expression="query:search($destQueryProcessor,'subt ree','',$DEST-DN,'User','secretary',$SEARCH-VALUE,'')"/>
</arg-node-set>
</do-set-local-variable>
<do-set-local-variable name="SRC-DN">
<arg-string>
<token-xpath expression="$lvQueryResult/@src-dn"/>
</arg-string>
</do-set-local-variable>
<do-for-each>
<arg-node-set>
<token-local-variable name="lvQueryResult"/>
</arg-node-set>
<arg-actions>
<do-remove-src-attr-value name="secretary">
<arg-value>
<token-local-variable name="SEARCH-VALUE"/>
</arg-value>
</do-remove-src-attr-value>
</arg-actions>
</do-for-each>
</actions>
--------------------


As you can see, I have hard coded an DN in the query for testing
purposes.

The trace for this rule:

Code:
--------------------
[12/11/2008 10:49:56.393] HANDLER ST: Applying rule 'EVT - Rule - Secretary Uit Dienst'.
[12/11/2008 10:49:56.392] HANDLER ST: Action: do-set-local-variable("DEST-DN","\idvault").
[12/11/2008 10:49:56.392] HANDLER ST: arg-string("\idvault")
[12/11/2008 10:49:56.392] HANDLER ST: token-text("\idvault")
[12/11/2008 10:49:56.394] HANDLER ST: Arg Value: "\idvault".
[12/11/2008 10:49:56.419] HANDLER ST: Action: do-set-local-variable("SEARCH-VALUE","cn=alan,ou=employees,ou=inactive,o=idvault ").
[12/11/2008 10:49:56.419] HANDLER ST: arg-string("cn=alan,ou=employees,ou=inactive,o=idvault ")
[12/11/2008 10:49:56.421] HANDLER ST: token-text("cn=alan,ou=employees,ou=inactive,o=idvault")
[12/11/2008 10:49:56.422] HANDLER ST: Arg Value: "cn=alan,ou=employees,ou=inactive,o=idvault".
[12/11/2008 10:49:56.421] HANDLER ST: Action: do-set-local-variable("lvQueryResult",arg-node-set(token-xpath("query:search($destQueryProcessor,'subtree', '',$DEST-DN,'User','secretary',$SEARCH-VALUE,'')"))).
[12/11/2008 10:49:56.423] HANDLER ST: arg-node-set(token-xpath("query:search($destQueryProcessor,'subtree', '',$DEST-DN,'User','secretary',$SEARCH-VALUE,'')"))
[12/11/2008 10:49:56.423] HANDLER ST: token-xpath("query:search($destQueryProcessor,'subtree', '',$DEST-DN,'User','secretary',$SEARCH-VALUE,'')")
[12/11/2008 10:49:56.423] HANDLER ST: Query from policy
[12/11/2008 10:49:56.423] HANDLER ST:
<nds dtdversion="3.0" ndsversion="8.x">
<source>
<product version="3.0.0.20051118 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<query class-name="User" dest-dn="\idvault" scope="subtree">
<search-class class-name="User"/>
<search-attr attr-name="secretary">
<value>cn=alan,ou=employees,ou=inactive,o=idvaul t</value>
</search-attr>
<read-attr/>
</query>
</input>
</nds>
[12/11/2008 10:49:56.454] HANDLER ST: Fixing up association references.
[12/11/2008 10:49:56.454] HANDLER ST: No schema mapping policies.
[12/11/2008 10:49:56.454] HANDLER ST: No output transformation policies.
[12/11/2008 10:49:56.455] HANDLER ST: Submitting document to subscriber shim:
[12/11/2008 10:49:56.455] HANDLER ST:
<nds dtdversion="3.0" ndsversion="8.x">
<source>
<product version="3.0.0.20051118 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<query class-name="User" dest-dn="\idvault" event-id="0" scope="subtree">
<search-class class-name="User"/>
<search-attr attr-name="secretary">
<value>cn=alan,ou=employees,ou=inactive,o=idvaul t</value>
</search-attr>
<read-attr/>
</query>
</input>
</nds>
[12/11/2008 10:49:56.997] HANDLER PT: Receiving DOM document from application.
[12/11/2008 10:49:56.997] HANDLER PT:
<nds dtdversion="3.0" ndsversion="8.x">
<source>
<product version="3.0.0.20051118 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<query class-name="User" dest-dn="\idvault" event-id="0" scope="subtree">
<search-class class-name="User"/>
<search-attr attr-name="secretary">
<value>cn=alan,ou=employees,ou=inactive,o=idvaul t</value>
</search-attr>
<read-attr/>
</query>
</input>
</nds>
[12/11/2008 10:49:56.999] HANDLER PT: No input transformation policies.
[12/11/2008 10:49:56.999] HANDLER PT: No schema mapping policies.
[12/11/2008 10:49:56.999] HANDLER PT: Resolving association references.
[12/11/2008 10:49:57.000] HANDLER PT: No event transformation policies.
[12/11/2008 10:49:57.000] HANDLER PT: Skipping publisher filter on operation query.
[12/11/2008 10:49:57.000] HANDLER PT: Publisher processing query for .
[12/11/2008 10:49:57.000] HANDLER PT: No command transformation policies.
[12/11/2008 10:49:57.002] HANDLER PT: Filtering out notification-only attributes.
[12/11/2008 10:49:57.001] HANDLER PT: Pumping XDS to eDirectory.
[12/11/2008 10:49:57.001] HANDLER PT: Performing operation query for \idvault.
[12/11/2008 10:49:57.504] HANDLER PT: Fixing up association references.
[12/11/2008 10:49:57.505] HANDLER PT: No schema mapping policies.
[12/11/2008 10:49:57.505] HANDLER PT: No output transformation policies.
[12/11/2008 10:49:57.505] HANDLER PT:
<nds dtdversion="3.0" ndsversion="8.x">
<source>
<product version="3.0.0.20051118 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status event-id="0" level="error">Code(-9010) An exception occurred: novell.jclient.JCException: nameToID -601 ERR_NO_SUCH_ENTRY</status>
</output>
</nds>
--------------------


The query result is an error saying that it cannot find any objects.
This is not correct, because when I executed the same query using an
LDAP browser, it gies me the correct result. So there is something wrong
with my query, but I do not know what the issue is. Please help !?


--
ttimmers
------------------------------------------------------------------------
ttimmers's Profile: http://forums.novell.com/member.php?userid=26810
View this thread: http://forums.novell.com/showthread.php?t=353919