[midPoint] Append values to EmployeeType in object template

Ana Pereyra apereyra at identicum.com
Tue Oct 11 23:01:30 CEST 2016


Hi everyone!

I'm experiencing some trouble trying to update a user's employeeType
attribute using the object template. Here is what I would like the object
template to do:

    <mapping>
      <source>
         <c:path>$user/extension/newValue</c:path>
           <name>newValue</name>
        </source>
        <source>
           <c:path>$user/employeeType</c:path>
           <name>employeeType</name>
        </source>
        <expression>
           <script>
             <language>
http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy
</language>
              <code>
                     if (newValue != null)
                            employeeType.add(newValue);
          </code>
           </script>
        </expression>
        <target>
          <path>employeeType</path>
        </target>
     </mapping>

The problem is that the value I get in the mapping of the employeeType is a
string (the first one of the employeeType values), not a list, so I can not
append values to it.

Can anyone help me with this?
Thanks!

*Ana Pereyra*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20161011/a3b695ac/attachment.htm>


More information about the midPoint mailing list