A customer brought to my attention a failing rule which, if it had been
failing all along, we could not have gone into production. Now, it's
failing... Hmmm...

Here's the basic premise: If a user is supposed to be assigned a phone
extension, the driver queries a pool of objects. From the results I create a
"nodeSet" variable containing a list of the objects that have an 'available'
flag set to true. If the query comes back with NO results, the rule is
supposed to "break" out and no assignment is made.

In the trace below you'll see I get a response of five available phones (I
limited this with "Max Results Returned" because we were getting a couple
hundred available phones returned).. Then the if-statement that tests the
node set for null/blank values evaluates to true. Gack!!

What's broken?

I use subsequent rules to parse out the first node in the set for
assignment. Why does this test of the local variable not work? I establish
the local variable in the same "Action" set as the If statement that tests
it. Is this a problem? Is it wrong to do a "case insensitive" test against
a node set?

Thanks,

R.

[04/29/08 15:42:25.715]:$$$$$$$ ST: Action:
do-set-local-variable("availPhone",scope="policy",arg-node-set(token-query(class-name="CUSTPhone",datastore="src",max-result-count="5",scope="subordinates",arg-dn("\CUSTidv\data\res\pho"),arg-match-attr("CUSTPhoneAvailable","true")))).
[04/29/08 15:42:25.716]:$$$$$$$ ST:
arg-node-set(token-query(class-name="CUSTPhone",datastore="src",max-result-count="5",scope="subordinates",arg-dn("\CUSTidv\data\res\pho"),arg-match-attr("CUSTPhoneAvailable","true")))
[04/29/08 15:42:25.717]:$$$$$$$ ST:
token-query(class-name="CUSTPhone",datastore="src",max-result-count="5",scope="subordinates",arg-dn("\CUSTidv\data\res\pho"),arg-match-attr("CUSTPhoneAvailable","true"))
[04/29/08 15:42:25.718]:$$$$$$$ ST:
arg-dn("\CUSTidv\data\res\pho")
[04/29/08 15:42:25.718]:$$$$$$$ ST:
token-text("\CUSTidv\data\res\pho")
[04/29/08 15:42:25.718]:$$$$$$$ ST: Arg Value:
"\CUSTidv\data\res\pho".
[04/29/08 15:42:25.719]:$$$$$$$ ST:
arg-match-attr("CUSTPhoneAvailable","true")
[04/29/08 15:42:25.719]:$$$$$$$ ST: arg-string("true")
[04/29/08 15:42:25.719]:$$$$$$$ ST: token-text("true")
[04/29/08 15:42:25.720]:$$$$$$$ ST: Arg Value: "true".
[04/29/08 15:42:25.720]:$$$$$$$ ST: Query from policy
[04/29/08 15:42:25.720]:$$$$$$$ ST:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.5.10.20070918 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<query-ex class-name="CUSTPhone" dest-dn="\CUSTidv\data\res\pho"
max-result-count="5" scope="subordinates">
<search-class class-name="CUSTPhone"/>
<search-attr attr-name="CUSTPhoneAvailable">
<value type="string">true</value>
</search-attr>
<read-attr/>
</query-ex>
</input>
</nds>
[04/29/08 15:42:25.722]:$$$$$$$ ST: Pumping XDS to eDirectory.
[04/29/08 15:42:25.723]:$$$$$$$ ST: Performing operation query-ex
for \CUSTidv\data\res\pho.
[04/29/08 15:42:25.730]:$$$$$$$ ST: Query from policy result
[04/29/08 15:42:25.731]:$$$$$$$ ST:
<nds dtdversion="3.5" ndsversion="8.x">
<source>
<product version="3.5.10.20070918 ">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<instance class-name="CUSTPhone"
qualified-src-dn="O=data\OU=res\OU=pho\CN=74087"
src-dn="\CUSTIDV\data\res\pho\74087" src-entry-id="157203"/>
<instance class-name="CUSTPhone"
qualified-src-dn="O=data\OU=res\OU=pho\CN=70391"
src-dn="\CUSTIDV\data\res\pho\70391" src-entry-id="154394"/>
<instance class-name="CUSTPhone"
qualified-src-dn="O=data\OU=res\OU=pho\CN=74816"
src-dn="\CUSTIDV\data\res\pho\74816" src-entry-id="151751"/>
<instance class-name="CUSTPhone"
qualified-src-dn="O=data\OU=res\OU=pho\CN=72016"
src-dn="\CUSTIDV\data\res\pho\72016" src-entry-id="150358"/>
<instance class-name="CUSTPhone"
qualified-src-dn="O=data\OU=res\OU=pho\CN=73208"
src-dn="\CUSTIDV\data\res\pho\73208" src-entry-id="150101"/>
<query-token>rO0ABXNyACxjb20ubm92ZWxsLm5kcy5kaXJ4bWwuZW5n aW5lLk5EU1JlYWRlciRUb2tlbuWeJE0ga5xBAgACSgAFc3RhbX BJAAlzdGF0ZUhhc2h4cAAAARmbtRO7AfVJcw==</query-token>
<status level="success"></status>
</output>
</nds>
[04/29/08 15:42:25.736]:$$$$$$$ ST: Token Value: {<instance>
@class-name = "CUSTPhone" @qualified-src-dn =
"O=data\OU=res\OU=pho\CN=74087" @src-dn = "\CUSTIDV\data\res\pho\74087"
@src-entry-id = "157203",<instance> @class-name = "CUSTPhone"
@qualified-src-dn = "O=data\OU=res\OU=pho\CN=70391" @src-dn =
"\CUSTIDV\data\res\pho\70391" @src-entry-id = "154394",<instance>
@class-name = "CUSTPhone" @qualified-src-dn =
"O=data\OU=res\OU=pho\CN=74816" @src-dn = "\CUSTIDV\data\res\pho\74816"
@src-entry-id = "151751",<instance> @class-name = "CUSTPhone"
@qualified-src-dn = "O=data\OU=res\OU=pho\CN=72016" @src-dn =
"\CUSTIDV\data\res\pho\72016" @src-entry-id = "150358",<instance>
@class-name = "CUSTPhone" @qualified-src-dn =
"O=data\OU=res\OU=pho\CN=73208" @src-dn = "\CUSTIDV\data\res\pho\73208"
@src-entry-id = "150101",<query-token> @datastore = "src" @read-attr = ""}.
[04/29/08 15:42:25.740]:$$$$$$$ ST: Arg Value: {<instance>
@class-name = "CUSTPhone" @qualified-src-dn =
"O=data\OU=res\OU=pho\CN=74087" @src-dn = "\CUSTIDV\data\res\pho\74087"
@src-entry-id = "157203",<instance> @class-name = "CUSTPhone"
@qualified-src-dn = "O=data\OU=res\OU=pho\CN=70391" @src-dn =
"\CUSTIDV\data\res\pho\70391" @src-entry-id = "154394",<instance>
@class-name = "CUSTPhone" @qualified-src-dn =
"O=data\OU=res\OU=pho\CN=74816" @src-dn = "\CUSTIDV\data\res\pho\74816"
@src-entry-id = "151751",<instance> @class-name = "CUSTPhone"
@qualified-src-dn = "O=data\OU=res\OU=pho\CN=72016" @src-dn =
"\CUSTIDV\data\res\pho\72016" @src-entry-id = "150358",<instance>
@class-name = "CUSTPhone" @qualified-src-dn =
"O=data\OU=res\OU=pho\CN=73208" @src-dn = "\CUSTIDV\data\res\pho\73208"
@src-entry-id = "150101",<query-token> @datastore = "src" @read-attr = ""}.
[04/29/08 15:42:25.743]:$$$$$$$ ST: Action: do-if().
[04/29/08 15:42:25.743]:$$$$$$$ ST: Evaluating conditions.
[04/29/08 15:42:25.744]:$$$$$$$ ST: (if-local-variable 'availPhone'
equal "") = TRUE.
[04/29/08 15:42:25.744]:$$$$$$$ ST: Performing if actions.
[04/29/08 15:42:25.744]:$$$$$$$ ST: Action: do-break().
[04/29/08 15:42:25.745]:$$$$$$$ ST: Query from policy
[04/29/08 15:42:25.745]:$$$$$$$ ST:
<nds dtdversion="3.5" ndsversion="8.x">