I am using this rule to discover if a matching OU exists then setting
the value to a local attribute named result-ou. If a matching object is
found the rules work s fine. If no matching ou is found I recieve an
error and the driver stop processing.

I am assuming i need to to an if-exist type query but do not know how.


trace from rule
[05/03/13 15:10:46.591]:seas-af ST: Action: do-if().
[05/03/13 15:10:46.591]:seas-af ST: Evaluating
conditions.
[05/03/13 15:10:46.591]:seas-af ST:
(if-local-variable 'deptcode' available) = TRUE.
[05/03/13 15:10:46.591]:seas-af ST:
(if-local-variable 'deptcode' match ".*") = TRUE.
[05/03/13 15:10:46.591]:seas-af ST: Performing if
actions.
[05/03/13 15:10:46.592]:seas-af ST: Action:
do-set-local-variable("result-ou",scope="policy",token-resolve(datastore="dest",arg-associati
on(token-query(class-name="Organizational
Unit",max-result-count="1",arg-match-attr("ou",token-local-variable("deptcode")))))).
[05/03/13 15:10:46.592]:seas-af ST:
arg-string(token-resolve(datastore="dest",arg-association(token-query(class-name="Organizational
Un
it",max-result-count="1",arg-match-attr("ou",token-local-variable("deptcode"))))))
[05/03/13 15:10:46.593]:seas-af ST:
token-resolve(datastore="dest",arg-association(token-query(class-name="Organizational
Unit",max-r
esult-count="1",arg-match-attr("ou",token-local-variable("deptcode")))))
[05/03/13 15:10:46.593]:seas-af ST:
arg-association(token-query(class-name="Organizational
Unit",max-result-count="1",arg-match-att
r("ou",token-local-variable("deptcode"))))
[05/03/13 15:10:46.593]:seas-af ST:
token-query(class-name="Organizational
Unit",max-result-count="1",arg-match-attr("ou",token-l
ocal-variable("deptcode")))
[05/03/13 15:10:46.594]:seas-af ST:
arg-match-attr("ou",token-local-variable("deptcode"))
[05/03/13 15:10:46.594]:seas-af ST:
arg-string(token-local-variable("deptcode"))
[05/03/13 15:10:46.594]:seas-af ST:
token-local-variable("deptcode")
[05/03/13 15:10:46.594]:seas-af ST:
Token Value: "60001278".
[05/03/13 15:10:46.594]:seas-af ST:
Arg Value: "60001278".
[05/03/13 15:10:46.595]:seas-af ST: Query
from policy

the search returns an empty Token Value the produces the error
[05/03/13 15:10:46.621]:seas-af ST: Token
Value: "".
[05/03/13 15:10:46.621]:seas-af ST: Arg
Value: "".

Message: Code(-9145) Error in
vnd.nds.stream://driver_name/Subscriber/Command#XmlData:112 : Unable to
determine target object for action
'token-resolve(datastore="dest",arg-association(token-query(class-name="Organizational
Unit",max-result-count="1",arg-match-attr("ou",token-local-variable("deptcode")))))'.

thanks
bryan


--
6202936
------------------------------------------------------------------------
6202936's Profile: https://forums.netiq.com/member.php?userid=456
View this thread: https://forums.netiq.com/showthread.php?t=47682