<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi,<br>
<br>
It depends on the input delta in the mapping. If the input just
adds the values then the mapping cannot really remove anything.
Mappings are relative. They work with each value individually. If
the mapping for any specific value returns null or empty value we
interpret that as "nothing to be added". But we usually do not
remove anything as that will break the relativity and it may cause
consistency issues. This is what we need maybe 99% of the time. In
this relative mode we do not expect that adding a value will
remove another value as that's not usually the case.<br>
<br>
Yet, there are two ways how to do it:<br>
<br>
1) Use absolute mapping. That will take all the input values and
produce all the output values (no relativity). Therefore if
absolute mapping returns null it is interpreted as "this should
not have any values". But beware: absolute mappings are brutal.
Take care not to break consistency. But as this is a single-value
property then it is probably OK. Concurrent modifications would
overwrite the same value anyway. Relativity will not save us here.<br>
<br>
2) Even better: use condition with the mapping. The expression in
the mapping should only transform the value. It should not be used
to control when the value should be present in the output and when
it should not. Condition controls when the mapping is applied.
Look at it in a different way: What you want is NOT removal of the
value. What you want is to use the value only if some condition is
true. That's what the mapping condition is for. MidPoint
interprets the condition in a smart way. MidPoint knows what
values are produced by the mapping. If the condition state changes
from true to false then midPoint knows that it has to remove the
values given by that mapping. This is a fully "relativistic" way.
And it is consistency friendly.<br>
<br>
<pre class="moz-signature" cols="72">--
Radovan Semancik
Software Architect
evolveum.com</pre>
<br>
<br>
<br>
On 10/20/2016 09:23 AM, Roman Pudil - AMI Praha a.s. wrote:<br>
</div>
<blockquote
cite="mid:emaebfbbf9-67cd-4260-a8a5-631e3565a2dd@rpudil-dell7440"
type="cite"><!--?xml version="1.0" encoding="utf-16"?-->
<style><!--a img
{border: 0px;}
body
{font-family: 'Segoe UI'; font-size: 12pt;}
--></style>
<div>Hi all,</div>
<div>how to simply remove value (XMLGregorianCaledndar) from
valueFrom and valueTo attribs in mappings (in template objects)?</div>
<div><br>
</div>
<div>Null, empty string and space did not helped.</div>
<div><br>
</div>
<div>Thanks!</div>
<div><br>
</div>
<div>Regards</div>
<div><br>
</div>
<div id="signature_old">
<div style="FONT-SIZE: 12pt; FONT-FAMILY: Tahoma">
<table style="WHITE-SPACE: normal; WORD-SPACING: 0px;
BORDER-COLLAPSE: collapse; TEXT-TRANSFORM: none; COLOR:
rgb(0,0,0); FONT: medium 'Times New Roman'; WIDOWS: 1;
LETTER-SPACING: normal; TEXT-INDENT: 0px;
-webkit-text-stroke-width: 0px">
<tbody>
<tr>
<td style="FONT-SIZE: 11px; FONT-FAMILY: Arial,
sans-serif; VERTICAL-ALIGN: bottom; COLOR: rgb(0,0,0)"
colspan="2">
<p><span style="FONT-SIZE: 14px; FONT-WEIGHT: bold">Roman
Pudil</span><br>
solution architect<br>
<br>
gsm: [+420] 775 663 666<br>
e-mail:<span class="Apple-converted-space"> </span><a
moz-do-not-send="true"
href="mailto:roman.pudil@ami.cz">roman.pudil@ami.cz</a></p>
</td>
<td style="BORDER-RIGHT: rgb(204,204,204) 1px solid"> </td>
<td> </td>
<td style="FONT-SIZE: 11px; FONT-FAMILY: Arial,
sans-serif; VERTICAL-ALIGN: bottom; COLOR: rgb(0,0,0)">
<p>AMI Praha a.s.<br>
Pláničkova 11<br>
162 00 Praha 6<br>
tel./fax: [+420] 274 783 239<br>
web:<span class="Apple-converted-space"> </span><a
moz-do-not-send="true" href="http://www.ami.cz">www.ami.cz</a></p>
</td>
<td style="BORDER-RIGHT: rgb(204,204,204) 1px solid"> </td>
<td> </td>
<td style="FONT-SIZE: 11px; FONT-FAMILY: Arial,
sans-serif; COLOR: rgb(0,0,0)">
<p><img moz-do-not-send="true" title="AMI Praha a.s."
alt=""
src="http://www.ami.cz/images/podpis/ami_logo.gif%20"
border="0"></p>
</td>
</tr>
<tr>
<td colspan="8"><br>
<a moz-do-not-send="true"
href="http://www.ami.cz/reseni-a-sluzby/bezpecnost-dat/identity-management"><img
moz-do-not-send="true" alt=""
src="http://www.ami.cz/images/podpis/AMI-podpis-IdM_1.png"
border="0"></a></td>
</tr>
<tr>
<td style="FONT-SIZE: 11px; FONT-FAMILY: Arial,
sans-serif; COLOR: rgb(128,128,128)" colspan="8"><br>
Textem tohoto e-mailu podepisující neslibuje uzavřít
ani neuzavírá za společnost AMI Praha a.s.<br>
jakoukoliv smlouvu. Každá smlouva, pokud bude
uzavřena, musí mít výhradně písemnou formu.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div><br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
midPoint mailing list
<a class="moz-txt-link-abbreviated" href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a>
<a class="moz-txt-link-freetext" href="http://lists.evolveum.com/mailman/listinfo/midpoint">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>