Hello everybody,

i'm struggling with a strange behavior of the jdbc ms sql driver. I hope
somebody can help me:

I have an multi-valued attribute in edir, which should be concatenated
in a single-valued database field.

For the concatenation i use the following policy:

<?xml version="1.0" encoding="UTF-8"?><policy>
<rule>
<description>Convert-Setup</description>
<conditions>
<or>
<if-src-attr name="dfnEduPersonCostCenter" op="available"/>
<if-op-attr disabled="true" name="dfnEduPersonCostCenter"
notrace="true" op="changing"/>
</or>
</conditions>
<actions>
<do-set-local-variable name="lv-costcenter">
<arg-node-set>
<token-src-attr class-name="User" name="dfnEduPersonCostCenter"/>
</arg-node-set>
</do-set-local-variable>
</actions>
</rule>
<rule>
<description>Concat CostCenter</description>
<conditions>
<and>
<if-local-variable name="lv-costcenter" op="available"/>
<if-src-attr name="dfnEduPersonCostCenter" op="available"/>
</and>
</conditions>
<actions>
<do-for-each>
<arg-node-set>
<token-local-variable name="lv-costcenter"/>
</arg-node-set>
<arg-actions>
<do-set-local-variable name="lvCostCenter">
<arg-string>
<token-local-variable name="lvCostCenter"/>
<token-text xml:space="preserve">, </token-text>
<token-local-variable name="current-node"/>
</arg-string>
</do-set-local-variable>
</arg-actions>
</do-for-each>
<do-strip-op-attr name="dfnEduPersonCostCenter"/>
<do-set-dest-attr-value name="dfnEduPersonCostCenter">
<arg-value type="string">
<token-replace-first regex=", " replace-with="">
<token-local-variable name="lvCostCenter"/>
</token-replace-first>
</arg-value>
</do-set-dest-attr-value>
</actions>
</rule>
<rule>
<description>Remove Values if Needed</description>
<conditions>
<and>
<if-src-attr name="dfnEduPersonCostCenter" op="not-available"/>
</and>
</conditions>
<actions>
<do-strip-op-attr name="dfnEduPersonCostCenter"/>
<do-clear-dest-attr-value name="dfnEduPersonCostCenter"/>
</actions>
</rule>
</policy>

This policy is working in other drivers too - without problems. For the
database inserts und updates i used the guide from
geoffc: http://tinyurl.com/k4cy7ww (thanks!).

Now the strange behavior: After the insert statement, the policy above
is ignored (only the first value of the multi-valued attribute was
inserted). After the update statement, everything is good (the value is
concatenated in the database field).

Why?? Do you have any idea how to fix this?


--
robertmeier83
------------------------------------------------------------------------
robertmeier83's Profile: https://forums.netiq.com/member.php?userid=1284
View this thread: https://forums.netiq.com/showthread.php?t=49723