Page tree

Versions Compared

Key

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

Table of Contents

Introduction

This page describes the most efficient steps to find out what is wrong with your mapping setup. The mappings are the most efficient mechanism to do almost everything in midPoint. Mapping mechanism is very powerful, but the mapping configuration and interactions may be get very complex. This page describes a method to use to figure out what is wrong, why the mappings are not behaving as expected and how to efficiently find where is the problem.

...

The model context is dumped into logs after each major step in the computation. To enable the model context dump use the following loggers:

ComponentLoggerLevel
Clockworkcom.evolveum.midpoint.model.impl.lens.ClockworkTRACE
Projectorcom.evolveum.midpoint.model.impl.lens.projector.ProjectorTRACE

The lens context dump looks like this:

...

First option is to enable the tracing globally for all expressions and mappings by setting one or more of the following loggers:

 Logger nameScopeRecommended
log levels
DescriptionVerbosity
com.evolveum.midpoint.model.common.mapping.MappingMapping TraceTRACELogs summary of execution for each mapping.
This is quite high-level mapping evaluation.
Medium
com.evolveum.midpoint.model.common.expression.ExpressionExpression TraceTRACELogs summary of expression evaluation.
This is lower-level trace of the expression with input and output dumps. It is quite verbose.
High

com.evolveum.midpoint.model.common.expression.script.ScriptExpression

Script Expression TraceTRACELogs a lot of details about script expression evaluation (Groovy, JavaScript, ...)
Provides a lot of details
Very high

The second option is available since midPoint 3.4.1 and 3.5. It can be used to enable tracing for any particular mapping:

...

If you find out the problem is somewhere inside a Script Expression code then there is way how to troubleshoot that. MidPoint has script expression functions that can be used to log messages from the scripting code. It works like this:


 

log.error('The {} is broken, {} is to blame', resource, reason)

See Script Expression Functions page for more details.

...