Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Field

 

Description

language

optional

Language URL. Specifies the language in which the expression is written. If not specified it defaults to Groovy language.

traceoptional

Explicitly trace the execution of this expression. The execution will be logged on INFO level if this property is set to true to make sure that it will be visible in the logs.
Available since midPoint 3.5.

returnType

optional

The type of the expression result, either "list" or "scalar". If not set it will be determined automatically from the target data type for the expression. This setting should be used only if the automatic mechanism does not work as expected.

relativityMode

optional

Values: relative (default) or absolute. See below for more details. If not specified and allowed by the expression usage it defaults to relative mode.

includeNullInputsoptional

If set to true (which is the default) the script will be evaluated with null value as argument when the input is changed from or to an empty value. This generally works well for most cases. It may be set to false as an optimization.

code

mandatory

Expression code. Depends on the script language used for the expression. This is usually a string, but it also may be an XML. Please note that the code is embedded in the XML therefore proper XML escaping is required

Variables

The XPath expressions used in midPoint are most frequently usually using variables that are set up by midPoint expression engine. For example, the following expression will evaluate to the content of the fullName property of a user (Groovy and Javascript):

Code Block
xml
xml
<code>
   $c:user/c:fullNameuser.getFullName()
</code>

See Expression page for more generic information about the use of variables in expressions.

...