I built two DNQuery fields for a workflow. One to retrieve all Managers
in a OU and one to retrieve all Templates in a OU. Both use a workflow
to add a new user to a Department. Once the department field is selected
from a pull down StaticList the other two fields can be used to select
the templates or managers to apply (feed the DNQuery the OU) for the new
user.

deptLong is the FormField that holds the Dept or "OU"

THE MANAGER QUERY WORKS FINE:

(function (){return "GetManagersFromOU";})();
(function (){return {"deptLong":form.getValue("deptLong")}})();

LDAP Trace:

14:32:08 9A716B90 Search request:
base: "ou=USERS,o=PBC"
scope:2 dereference:0 sizelimit:0 timelimit:0 attrsonly:0
filter:
"(&(objectClass=inetOrgPerson)(&(isManager=TRUE)(o u=Information Systems
Services)))"
attribute: "sn"
attribute: "ou"
attribute: "givenName"
attribute: "srvprvHideUser"
attribute: "srvprvHideAttributes"
attribute: "modifyTimeStamp"
attribute: "objectClass"
14:32:08 9A716B90 Sending search result entry
"cn=CLessard,ou=ISS,ou=USERS,o=PBC" to connection 0x15c6b000
14:32:08 9A716B90 Sending search result entry
"cn=AMovetest1,ou=ISS,ou=USERS,o=PBC" to connection 0x15c6b000
14:32:08 9A716B90 Sending search result entry
"cn=GHoldefe,ou=ISS,ou=USERS,o=PBC" to connection 0x15c6b000
14:32:08 9A716B90 Sending search result entry
"cn=KSpivack,ou=ISS,ou=USERS,o=PBC" to connection 0x15c6b000
14:32:08 9A716B90 Sending operation result 0:"":"" to connection
0x15c6b000

LOG:

2010-03-15 14:32:08,510 DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataAcce ss]
(http-0.0.0.0-8180-1) VDA.getEntityResultList
2010-03-15 14:32:08,524 INFO [STDOUT] (http-0.0.0.0-8180-1) DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataMode l:getEntityDefinition]
VDM.getEntityDefinition(String, Locale):user
2010-03-15 14:32:08,510 DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataMode l]
(http-0.0.0.0-8180-1) VDM.getEntityDefinition(String, Locale):user
2010-03-15 14:32:08,529 INFO [STDOUT] (http-0.0.0.0-8180-1) DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataAcce ss:resolveLdapFilter]
Dynamically query with paramter substition:
(&(isManager=TRUE)(ou=Information Systems Services))
2010-03-15 14:32:08,528 DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataAcce ss]
(http-0.0.0.0-8180-1) Dynamically query with paramter substition:
(&(isManager=TRUE)(ou=Information Systems Services))
2010-03-15 14:32:08,529 INFO [STDOUT] (http-0.0.0.0-8180-1) DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataAcce ss:buildEntityFilter]
VDA.getEntityResultList query filter:
(&(objectClass=inetOrgPerson)(&(isManager=TRUE)(ou =Information Systems
Services)))
2010-03-15 14:32:08,529 DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataAcce ss]
(http-0.0.0.0-8180-1) VDA.getEntityResultList query filter:
(&(objectClass=inetOrgPerson)(&(isManager=TRUE)(ou =Information Systems
Services)))


_Retrieves_my_4_Managers_and_displays_them._




THE SAME TYPE DNQUERY FOR A TEMPLATE DISPLAYS AN EMPTY BOX:

(function (){return "GetTemplatesFromOU";})();
(function (){return {"deptLong":form.getValue("deptLong")}})();

LDAP TRACE:
14:38:52 9A514B90 Search request:
base: "OU=USERS,O=PBC"
scope:2 dereference:0 sizelimit:0 timelimit:0 attrsonly:0
filter: "(&(objectClass=Template)(ou=Information Systems
Services))"
attribute: "srvprvHideUser"
attribute: "srvprvHideAttributes"
attribute: "modifyTimeStamp"
attribute: "objectClass"
14:38:52 9A514B90 Sending search result entry
"cn=ISS-UserAppTemplate2,ou=ISS,ou=USERS,o=PBC" to connection
0x15c6b000
14:38:52 9A514B90 Sending search result entry
"cn=ISS-IDM-Template-2Groups,ou=ISS,ou=USERS,o=PBC" to connection
0x15c6b000
14:38:52 9A514B90 Sending search result entry
"cn=ISSUserAppTemplate,ou=ISS,ou=USERS,o=PBC" to connection 0x15c6b000
14:38:52 9A514B90 Sending operation result 0:"":"" to connection
0x15c6b000

_LDAP_retrieves_my_three_templates_that_I_wish_to_ display?_


LOG Results:
2010-03-15 14:38:52,848 DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataAcce ss]
(http-0.0.0.0-8180-2) VDA.getEntityResultList
2010-03-15 14:38:52,849 INFO [STDOUT] (http-0.0.0.0-8180-2) DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataMode l:getEntityDefinition]
VDM.getEntityDefinition(String, Locale):Template
2010-03-15 14:38:52,849 DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataMode l]
(http-0.0.0.0-8180-2) VDM.getEntityDefinition(String, Locale):Template
2010-03-15 14:38:52,850 INFO [STDOUT] (http-0.0.0.0-8180-2) DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataAcce ss:resolveLdapFilter]
Dynamically query with paramter substition: (ou=Information Systems
Services)
2010-03-15 14:38:52,850 DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataAcce ss]
(http-0.0.0.0-8180-2) Dynamically query with paramter substition:
(ou=Information Systems Services)
2010-03-15 14:38:52,851 INFO [STDOUT] (http-0.0.0.0-8180-2) DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataAcce ss:buildEntityFilter]
VDA.getEntityResultList query filter:
(&(objectClass=Template)(ou=Information Systems Services))
2010-03-15 14:38:52,851 DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataAcce ss]
(http-0.0.0.0-8180-2) VDA.getEntityResultList query filter:
(&(objectClass=Template)(ou=Information Systems Services))
2010-03-15 14:38:52,860 INFO [STDOUT] (http-0.0.0.0-8180-2) DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataMode l:getEntityDefinition]
VDM.getEntityDefinition(String, Locale):Template
2010-03-15 14:38:52,859 DEBUG
[com.novell.srvprv.impl.vdata.model.VirtualDataMode l]
(http-0.0.0.0-8180-2) VDM.getEntityDefinition(String, Locale):Template

The log show the dynamic query issuing the correct query with Template
Class and correct department being passed. LDAP shows the correct
templates being passed.

HOWEVER ALL I GET IS A BLANK WINDOW WITH NO SELECTION TO CHOSE?

I do not see the problem in the Trace or Log!

One thing I do notice is that no Attributes show in the LDAP Log for
the Template selection were they do in the Manager LDAP log (even though
it does send the three Template that make the query results? My
Template Entity does have the attributes of CN, OU, Description...

I have tried recreating the DAL query and Template Entity with
different names and using those in a different WF and still get the same
results!

Can someone please explain why this might be?

Thank you,

Gary


--
gholdefe
------------------------------------------------------------------------
gholdefe's Profile: http://forums.novell.com/member.php?userid=35453
View this thread: http://forums.novell.com/showthread.php?t=404744