Groovy Expressions

Last modified 14 Mar 2024 12:46 +01:00
Groovy scripting expression feature
This page is an introduction to Groovy scripting expression midPoint feature. Please see the feature page for more details.
Table of Contents

Groovy is a supported expression language in midPoint. Its language URL is:

http://midpoint.evolveum.com/xml/ns/public/expression/language#Groovy

Examples

User name

Following code returns a name property of a user. It is using groovy safe dereference operator (?.) to make sure this code works as expected even if user is null. User can be null is some situations, such as when evaluating outbound expression for a deleted user. Therefore the use of safe dereference operator is advised in almost all situations.

focus?.getName();

Create fullName

focus.getGivenName() + " " + focus.getFamilyName();
Was this page helpful?
YES NO
Thanks for your feedback