[midPoint] List of user roles
    Pavol Mederly 
    mederly at evolveum.com
       
    Tue Jun 21 12:07:18 CEST 2016
    
    
  
Hello Petr,
sorry for the late answer, this message completely flew out of my sight.
I think that the only possible way is to repeatedly call 
midpoint.getObject method for each OID in order to get the name.
You could speed it up by setting "noFetch" option.
As for the object type (required for getObject method): you can retrieve 
it from the targetRef, or set directly to ObjectType.class - when 
retrieving the name only, it shouldn't be a problem.
Beware of exception handling (object not found, security violation, 
...). I usually put OID instead of name in such cases.
In the future we perhaps should provide some method in midpoint 
functions library to do that. Maybe you could log a jira.
Best regards,
Pavol
On 14.06.2016 9:43, Petr Gašparík wrote:
> Hi,
> I am trying to list user roles in notification body.
>
> so basically something like
>
>                     allAssignments = requestee.getAssignment();
>                     allAssignments.each {
>                         body += 
> basic.stringify(it.getTargetRef()?.getOid()) + "\n";
>                     };
>
> but with names instead of oid.
>
> What is best practice how to get that?
>
> thank you in advance,
> Petr Gašparík
> -- 
> -- 
> Petr G.
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20160621/1532a62f/attachment.htm>
    
    
More information about the midPoint
mailing list