basic.norm('Guľôčka v jamôčke!')
Script Expression Functions
Introduction
MidPoint provides several sets of built-in functions for scripting expressions. Although the scripting expressions can use full potential of the scripting language and all the associated libraries, there are some things that are commonly used in most deployments. These are either common for many IDM deployments such as string normalization and conversion or such functions are specific to the way how midPoint works. Either way there are several function libraries that are accessible from all the scripting environments that midPoint supports.
Each function library has its own "handle" that is used to access the functions.
Invocation for generic scripting environments (Groovy, JavaScript, …) uses simple variable name to access the functions.
The following code snippet shows Groovy syntax for invocation of function norm
in library identified by variable basic
. The variable names used as library handles are pre-defined.
They are specified in the following text.
Not to be confused with custom function libraries. |
Basic Library
Basic function library provides very basic functions for string operations, object property retrieval, etc. These are simple, efficient stand-alone functions.
Namespace | http://midpoint.evolveum.com/xml/ns/public/function/basic-3 |
---|---|
library name |
|
Logging Library
Logging library provides access to logging functions. The functions may be used to log data to the midPoint system logs. Such functions are used mostly for diagnostics and troubleshooting.
Namespace | http://midpoint.evolveum.com/xml/ns/public/function/log-3 |
---|---|
library name |
|
All functions in this library log an entry into the system logs.
Ordinary midPoint logging system is used.
The log entries are recorded using com.evolveum.midpoint.expression
logger.
The functions have arguments using the SLF4J style: The first argument is a format string.
Each occurrence of {}
in the format string is replaced with the argument that follows the format string.
E.g. following Groovy code will produce ERROR log record `"The foo is broken, bar is to blame`" assuming that resource=foo and reason=bar.
log.error('The {} is broken, {} is to blame', resource, reason)
Functions:
-
error
-
warn
-
info
-
debug
-
trace
Please see Log Levels page for description of the usual meaning and usage of individual log levels in midPoint.
MidPoint Library
Main article: MidPoint Script Library
MidPoint function library provides access to midPoint internals. It provides complex functions that contain IDM-specific and midPoint-specific logic.
Namespace | http://midpoint.evolveum.com/xml/ns/public/function/midpoint-3 |
---|---|
library name |
midpoint |
Documentation and Source Code
Please follow the JavaDoc links below for a documentation of individual functions. The source code may also provide additional information.
Version | Basic Library | Logging Library | MidPoint Library |
---|---|---|---|
4.10-SNAPSHOT |
|||
4.9 |
|||
4.8.5 |
|||
4.8.4 |
|||
4.8.3 |
|||
4.8.2 |
|||
4.8.1 |
|||
4.8 |
|||
4.7.4 |
|||
4.7.3 |
|||
4.7.2 |
|||
4.7.1 |
|||
4.7 |
|||
4.6.1 |
|||
4.6 |
|||
4.5 |
|||
4.4.9 |
|||
4.4.8 |
|||
4.4.7 |
|||
4.4.6 |
|||
4.4.5 |
|||
4.4.4 |
|||
4.4.3 |
|||
4.4.2 |
|||
4.4.1 |
|||
4.4 |
|||
4.3.2 |
|||
4.3.1 |
|||
4.3 |
|||
4.2 |
|||
4.1 |
|||
4.0.4 |
|||
4.0.3 |
|||
4.0.2 |
|||
3.9.1 |
|||
4.0.1 |
|||
4.0 |
|||
3.9 |
|||
3.8 |
|||
3.7.2 |
|||
3.7.1 |
|||
3.7 |
|||
3.6.1 |
|||
3.6 |
|||
3.5.1 |
|||
3.C |
|||
3.5 |
|||
3.4.1 |
|||
3.4 |
|||
3.3.1 |
|||
3.3 |
|||
3.2 |
|||
3.1.1 |
|||
3.1 |
|||
3.0 |