We receive a .CSV file with a column (for lack of a better word) where
"OU" contains the Department information in all UPPER CASE.

We don't like that format in the UserApp/eDir, so we (currently) have to
manually massage the data in Excel to reformat to Business Case (that's
what MS calls it).

Example:

INFORMATION SERVICES -> Information Services
or
FISH, WILDLIFE, &, SOMETHINGELSE -> Fish, Wildlife, &, Something Else


I have this in my driver in the Command Policy stuff that goes from Text
to eDir:


Code:
--------------------
<rule>
<description>Business Case a String</description>
<conditions>
<and>
<if-op-attr name="OU" op="available"/>
</and>
</conditions>
<actions>
<do-set-local-variable name="tokenize-ou" scope="policy">
<arg-node-set>
<token-split delimiter=" ">
<token-op-attr name="OU"/>
</token-split>
</arg-node-set>
</do-set-local-variable>
<do-for-each>
<arg-node-set>
<token-local-variable name="tokenize-ou"/>
</arg-node-set>
<arg-actions>
<do-set-local-variable name="new-ou" scope="policy">
<arg-string>
<token-local-variable name="new-ou"/>
<token-text xml:space="preserve"> </token-text>
<token-upper-case>
<token-substring length="1">
<token-local-variable name="current-node"/>
</token-substring>
</token-upper-case>
<token-lower-case>
<token-substring start="1">
<token-local-variable name="current-node"/>
</token-substring>
</token-lower-case>
</arg-string>
</do-set-local-variable>
</arg-actions>
</do-for-each>
<do-reformat-op-attr name="OU">
<arg-value type="string">
<token-substring start="1">
<token-local-variable name="new-ou"/>
</token-substring>
</arg-value>
</do-reformat-op-attr>
</actions>
</rule>

--------------------


It doesn't appear to be working, and the level 3 trace logs don't really
indicate what/where the problem is at.


> [11/15/12 17:39:48.944]:HRIS-Delimited Text-2 PT:Applying policy:
> %+C%14CChange Case%-C.
> [11/15/12 17:39:48.944]:HRIS-Delimited Text-2 PT: Applying to modify
> #1.
> [11/15/12 17:39:48.945]:HRIS-Delimited Text-2 PT:Policy returned:
> [11/15/12 17:39:48.945]:HRIS-Delimited Text-2 PT:
> <nds dtdversion="4.0" ndsversion="8.x">
> <source>
> <product edition="Advanced" version="4.0.1.0">DirXML</product>
> <contact>Novell, Inc.</contact>
> </source>
> <input>
> <modify class-name="User" dest-dn="ABC\CO\OAS\DIS\jxgreene"
> dest-entry-id="57990" from-merge="true" src-dn=" ">
> <association>jxgreene</association>
> <modify-attr attr-name="employeeSubType">
> <remove-value>
> <value timestamp="1353018958#9" type="string">Permanent
> Employee</value>
> </remove-value>
> </modify-attr>
> <modify-attr attr-name="employeeType">
> <remove-value>
> <value timestamp="1353018958#7" type="string">ABC -
> Employee</value>
> </remove-value>
> </modify-attr>
> <modify-attr attr-name="OU">
> <add-value>
> <value type="string">INFORMATION SERVICES</value>
> </add-value>
> </modify-attr>
> <modify-attr attr-name="employeeSubType">
> <add-value>
> <value type="string">9000</value>
> </add-value>
> </modify-attr>
> <modify-attr attr-name="manager">
> <remove-all-values/>
> <add-value>
> <value type="dn">\ABC-IDM-DEV\dec\CO\OAS\DIS\bkkelley</value>
> </add-value>
> </modify-attr>
> <modify-attr attr-name="employeeType">
> <remove-all-values/>
> <add-value>
> <value type="string">ABC - Employee</value>
> </add-value>
> </modify-attr>
> <modify-attr attr-name="employeeSubType">
> <remove-all-values/>
> <add-value>
> <value type="string">Permanent Employee</value>
> </add-value>
> </modify-attr>
> </modify>
> </input>
> </nds>
>



--
kjhurni
------------------------------------------------------------------------
kjhurni's Profile: https://forums.netiq.com/member.php?userid=322
View this thread: https://forums.netiq.com/showthread.php?t=46185