Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

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

Code Block
none
none
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.

Code Block
groovy
groovy
user?.getName();

Create fullName

Code Block
groovy
groovy
user.getGivenName() + " " + user.getFamilyName();