I'm trying to create GroupWise distibution lists for the various trips
that my college runs. All of the trip data is stored in a mysql
database, with the students going on the trip stored by their college ID
number (which has nothing to do with their DN in the vault).

In the code below, I can successfuly read the list of IDs for the trip
group that I'm creating. What I need to do now, and this is where I'm
stuck, is to iterate through the IDs, use them to find the matching user
object in the vault (matching on an attribute called "pscUniteID") and
then add that user DN to the group membership for my newly created trip

I've looked at using do-find-matching-object, but it looks like this
will just change the DN for the group I'm creating and won't return
anything that I can use? What should I do?

I can add users to the group using do-add-dest-attr-value, but I need
someway of retrieving the DNs first.


<?xml version="1.0" encoding="UTF-8"?>
<policy xmlns:cmd="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsCommandProcessor">
<description>Add Students to Group</description>
<if-operation op="equal">add</if-operation>
<do-set-local-variable name="sql-statement">
<token-text xml:space="preserve">SELECT StudentID FROM idm_gateway.student_trip WHERE TripID=</token-text>
<token-op-attr name="pscTripID"/>
<do-set-local-variable name="query">
<token-text xml:space="preserve">&lt;jdbc:statement xmlns:jdbc="urn:dirxml:jdbc">&lt;jdbc:sql></token-text>
<token-local-variable name="sql-statement"/>
<token-text xml:space="preserve">&lt;/jdbc:sql>&lt;/jdbc:statement></token-text>
<do-set-local-variable name="resultset">
<token-xpath expression="query:query($srcQueryProcessor, $query)"/>
<token-xpath expression="$resultset//jdbc:value"/>


Sam King

samjking's Profile: http://forums.novell.com/member.php?userid=68487
View this thread: http://forums.novell.com/showthread.php?t=403400