I am using the query token in the trace below, this is a txt driver and my destination is the file and the source is the vault. As a change is made in the vault, I want to 'on the subscriber channel' query the user to get their externalDeptNumber and then read the OU from that externalDeptNumber.....but as you can see in the trace, it is reading the OU from the user object and then querying the externalDeptNumber and obviously not reading anything at that point because there is nothing left to read. I have this working on other drivers but the only difference I know of is that on the drivers it is working on, I am querying the destination datastore instead of the source like in this one. That seems to make a difference but I didn't know that it would, I thought that match on 'value' and then 'read' value in the query token would perform the same regardless of querying the source or destination and why is it reading the OU value before it even searches for the match attribute specified...What am I doing wrong? :-)


07:13:31 2112F700 Drvrs: DRIVER-Export ST: Action: do-reformat-op-attr("Dept Name",token-query(class-name="AttributeMgt",datastore="src",arg-match-attr("externalDeptNumber"),token-attr("OU"))).
07:13:31 2112F700 Drvrs: DRIVER-Export ST: arg-string(token-query(class-name="AttributeMgt",datastore="src",arg-match-attr("externalDeptNumber"),token-attr("OU")))
07:13:31 2112F700 Drvrs: DRIVER-Export ST: token-query(class-name="AttributeMgt",datastore="src",arg-match-attr("externalDeptNumber"),token-attr("OU"))
07:13:31 2112F700 Drvrs: DRIVER-Export ST: arg-match-attr("externalDeptNumber")
07:13:31 2112F700 Drvrs: DRIVER-Export ST: arg-string(token-attr("OU"))
07:13:31 2112F700 Drvrs: DRIVER-Export ST: token-attr("OU")
07:13:31 2112F700 Drvrs: DRIVER-Export ST: Query from policy
07:13:31 2112F700 Drvrs: DRIVER-Export ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.4.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<query class-name="User" dest-dn="\placement\user\BUSER" dest-entry-id="41106" scope="entry">
<read-attr attr-name="OU"/>
</query>
</input>
</nds>
07:13:31 2112F700 Drvrs: DRIVER-Export ST: Pumping XDS to eDirectory.
07:13:31 2112F700 Drvrs: DRIVER-Export ST: Performing operation query for \placement\user\BUSER.
07:13:31 2112F700 Drvrs: DRIVER-Export ST: --JCLNT-- \PATH\TO\DRIVER\DRIVER-Export : Duplicating : context = 2024210510, tempContext = 2024210527
07:13:31 2112F700 Drvrs: DRIVER-Export ST: --JCLNT-- \PATH\TO\DRIVER\DRIVER-Export : Calling free on tempContext = 2024210527
07:13:31 2112F700 Drvrs: DRIVER-Export ST: Query from policy result
07:13:31 2112F700 Drvrs: DRIVER-Export ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.4.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<output>
<instance class-name="User" qualified-src-dn="O=TESTOU\OU=USER\CN=BUSER" src-dn="\placement\user\BUSER" src-entry-id="41106">
<association state="associated">HxW/345TET34T+uA==</association>
</instance>
<status level="success"></status>
</output>
</nds>
07:13:31 2112F700 Drvrs: DRIVER-Export ST: Token Value: "".
07:13:31 2112F700 Drvrs: DRIVER-Export ST: Arg Value: "".
07:13:31 2112F700 Drvrs: DRIVER-Export ST: Query from policy
07:13:31 2112F700 Drvrs: DRIVER-Export ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.4.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<query class-name="AttributeMgt" scope="subtree">
<search-class class-name="AttributeMgt"/>
<search-attr attr-name="externalDeptNumber">
<value timestamp="1501098777#1" type="string">123456</value>
</search-attr>
<read-attr/>
</query>
</input>
</nds>
07:13:31 2112F700 Drvrs: DRIVER-Export ST: Pumping XDS to eDirectory.
07:13:31 2112F700 Drvrs: DRIVER-Export ST: Performing operation query for .
07:13:31 2112F700 Drvrs: DRIVER-Export ST: --JCLNT-- \PATH\TO\DRIVER\DRIVER-Export : Duplicating : context = 2024210510, tempContext = 2024210527
07:13:31 2112F700 Drvrs: DRIVER-Export ST: --JCLNT-- \PATH\TO\DRIVER\DRIVER-Export : Calling free on tempContext = 2024210527
07:13:31 2112F700 Drvrs: DRIVER-Export ST: Query from policy result
07:13:31 2112F700 Drvrs: DRIVER-Export ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.4.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<output>
<status level="success"></status>
</output>
</nds>
07:13:31 2112F700 Drvrs: DRIVER-Export ST: Token Value: "".
07:13:31 2112F700 Drvrs: DRIVER-Export ST: Arg Value: "".