[midPoint] Append values to EmployeeType in object template

Oskar Butovič - AMI Praha a.s. oskar.butovic at ami.cz
Wed Oct 12 10:17:14 CEST 2016


Hi Ana,

maybe you could try <relativityMode>absolute</relativityMode> in your
script. This switch lets you to work with multivalue attributes as with
arrays. But in this mode (relative is default) plainly returning newValue
might doo the trick too.

Oskar

2016-10-12 9:56 GMT+02:00 Ivan Noris <Ivan.Noris at evolveum.com>:

> Hi Ana,
>
> how is your extension/newValue attribute defined in schema extension?
> Ivan
>
> ------------------------------
>
> *From: *"Ana Pereyra" <apereyra at identicum.com>
> *To: *midpoint at lists.evolveum.com
> *Sent: *Tuesday, October 11, 2016 11:01:30 PM
> *Subject: *[midPoint] Append values to EmployeeType in object template
>
>
> 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*
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
>
>
>
> --
> Ivan Noris
> Senior Identity Engineer
> evolveum.com
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
>


-- 

Oskar Butovič
solution architect

gsm: [+420] 774 480 101
e-mail: oskar.butovic at ami.cz


AMI Praha a.s.
Pláničkova 11
162 00 Praha 6
tel.: [+420] 274 783 239
web: www.ami.cz


[image: AMI Praha a.s.]

[image: AMI Praha a.s.]
<http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management>

Textem tohoto e-mailu podepisující neslibuje uzavřít ani neuzavírá za
společnost AMI Praha a.s.
jakoukoliv smlouvu. Každá smlouva, pokud bude uzavřena, musí mít výhradně
písemnou formu.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20161012/7ce59997/attachment.htm>


More information about the midPoint mailing list