I do not think you need a new class for a nickname? Is this not just
adding to an existing object?

So your issue is your Add dest object creates the <add> event. Then all
your add dest attr tokens, dump them into a following <modify> event.

Try changing the set dest attrs to add dest attrs, same as otherwise,
and see if that helps.

Oh wait, I see. You do not specify a dest-dn. So the add tries to an
object with no DN which will fail. Then all the set dest-attrs are on
the current object. Which I think is actually what you want, but if you
really need a new object class, this would be wrong.


On 6/13/2012 10:06 AM, rhettplace wrote:
>
> I am trying to follow the example from the GW driver doc to create a
> nickname whenever a new account is created. Specifically, I am using
> example 1 from section 5.3.9. The example shows the XDS output but it
> doesn't give any example of the policy/rule used to create it. My issue
> is that the add-attr tags are not contained within the add tag.
> Instead, they are being placed in a modify tag for the original add user
> event. How can I nest the necessary attributes withing the add tag for
> the nickname?
>
> eDir version 8.8 running on Linux
> IDM version 3.6.1 running on Linux
> GW version 8 running on NetWare
>
> Here is the policy XML I am using...
>
>
> Code:
> --------------------
>
> <rule>
> <description>User: Create Nickname</description>
> <conditions>
> <and>
> <if-class-name op="equal">User</if-class-name>
> </and>
> </conditions>
> <actions>
> <do-set-local-variable name="user-nickname" scope="policy">
> <arg-string>
> <token-upper-case>
> <token-substring length="1">
> <token-op-attr name="Given Name"/>
> </token-substring>
> </token-upper-case>
> <token-lower-case>
> <token-substring start="1">
> <token-op-attr name="Given Name"/>
> </token-substring>
> </token-lower-case>
> <token-text xml:space="preserve">.</token-text>
> <token-upper-case>
> <token-substring length="1">
> <token-op-attr name="Surname"/>
> </token-substring>
> </token-upper-case>
> <token-lower-case>
> <token-substring start="1">
> <token-op-attr name="Surname"/>
> </token-substring>
> </token-lower-case>
> <token-text xml:space="preserve">@domain.com</token-text>
> </arg-string>
> </do-set-local-variable>
> <do-add-dest-object class-name="Groupwise Nickname" when="after">
> <arg-dn>
> <token-local-variable name="MAIL\PO01"/>
> </arg-dn>
> </do-add-dest-object>
> <do-set-dest-attr-value class-name="Groupwise Nickname" name="50068" when="after">
> <arg-value type="string">
> <token-text xml:space="preserve">domain.com</token-text>
> </arg-value>
> </do-set-dest-attr-value>
> <do-set-dest-attr-value class-name="Groupwise Nickname" name="50069" when="after">
> <arg-value type="string">
> <token-local-variable name="MAIL\PO01"/>
> </arg-value>
> </do-set-dest-attr-value>
> <do-set-dest-attr-value class-name="Groupwise Nickname" name="50070" when="after">
> <arg-value type="string">
> <token-op-attr name="CN"/>
> </arg-value>
> </do-set-dest-attr-value>
> <do-set-dest-attr-value class-name="Groupwise Nickname" name="50073" when="after">
> <arg-value type="string">
> <token-local-variable name="user-nickname"/>
> </arg-value>
> </do-set-dest-attr-value>
> </actions>
> </rule>
>
> --------------------
>
>
> And here is the result in a level 3 trace (couldn't find how to
> "attach" a file to this post)...
>
> <add class-name="Groupwise Nickname" dest-dn="" event-id="0"/>
> <modify class-name="User" dest-dn="MAIL\PO01" event-id="0"
> qualified-src-dn="O=Org\OU=Loc\CN=SmithA" src-dn="\COM\Org\Loc\SmithA"
> src-entry-id="82516">
> <modify-attr attr-name="50068">
> <remove-all-values/>
> <add-value>
> <value type="string">domain.com</value>
> </add-value>
> </modify-attr>
> <modify-attr attr-name="50069">
> <remove-all-values/>
> <add-value>
> <value type="string">MAIL\PO01</value>
> </add-value>
> </modify-attr>
> <modify-attr attr-name="50070">
> <remove-all-values/>
> <add-value>
> <value type="string">SmithA</value>
> </add-value>
> </modify-attr>
> <modify-attr attr-name="50073">
> <remove-all-values/>
> <add-value>
> <value type="string">Albert.Smith@domain.com</value>
> </add-value>
> </modify-attr>
> </modify>
>
>