[midPoint] Append values to EmployeeType in object template

Ana Pereyra apereyra at identicum.com
Wed Oct 12 21:45:22 CEST 2016


Hello everyone.

Using "<relativityMode>absolute</relativityMode>" in my script fixed the
issue and I was able to get the employeeType and manipulate it as a list
and not a string. Thanks to the both of you for the help!

Regards,

2016-10-12 5:17 GMT-03:00 Oskar Butovič - AMI Praha a.s. <
oskar.butovic at ami.cz>:

> 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/expres
>> sion/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.
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
>


-- 
*Ana Pereyra*
 Identicum S.A.

*Jorge Newbery 3226, ArgentinaTel: +54 (11) **4552.3050*
*apereyra at identicum.com <apereyra at identicum.com>*
www.identicum.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20161012/3e7e00ec/attachment.htm>


More information about the midPoint mailing list