<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Ubuntu;
panose-1:2 11 5 4 3 6 2 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.DefaultFontHxMailStyle
{mso-style-name:"Default Font HxMail Style";
font-family:"Ubuntu",sans-serif;
color:windowtext;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
.MsoChpDefault
{mso-style-type:export-only;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=EN-US link=blue vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span class=DefaultFontHxMailStyle>So what I can read from, you want to archive the old value? We do this for various attributes when they are changed, see here, I had added it to the midpoint samples a while back, it will take the old value which was previously set and then add it to a custom schema attribute for archival history, such as a username change, level change, affiliation, etc..<o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><p class=MsoNormal><a href="https://github.com/evolveum/midpoint-samples/blob/master/samples/contrib/bshp/objects/objectTemplates/Includes%20-%20Archiving.xml">https://github.com/evolveum/midpoint-samples/blob/master/samples/contrib/bshp/objects/objectTemplates/Includes%20-%20Archiving.xml</a><span class=DefaultFontHxMailStyle><o:p></o:p></span></p><p class=MsoNormal><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><div style='mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='border:none;padding:0in'><b>From: </b><a href="mailto:richard.frovarp@ndsu.edu">Richard Frovarp</a><br><b>Sent: </b>Thursday, July 2, 2020 11:13 AM<br><b>Subject: </b>[midPoint] How to blank out user properties?</p></div><p class=MsoNormal><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><p class=MsoNormal>I'm reading a list of our employees from a DB through a</p><p class=MsoNormal>DatabaseTableConnector resource. As part of that process I'm setting a</p><p class=MsoNormal>custom schema element that is their title. That's fine. However, when</p><p class=MsoNormal>they are no longer employed, they disappear from the database table.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So I'm trying to blank out the title property, since if they aren't</p><p class=MsoNormal>employed anymore, they don't have a title. We want to keep historic</p><p class=MsoNormal>records, and they may still be a student, which we wouldn't populate a</p><p class=MsoNormal>title.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>How does one go about doing this? It was suggested using an object</p><p class=MsoNormal>template on the deleted situation, but that doesn't appear to be</p><p class=MsoNormal>working.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Resource:</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><reaction></p><p class=MsoNormal> <situation>deleted</situation></p><p class=MsoNormal> <synchronize>true</synchronize></p><p class=MsoNormal> <action></p><p class=MsoNormal> <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action</p><p class=MsoNormal>-3#unlink</handlerUri>;</p><p class=MsoNormal> </action></p><p class=MsoNormal> <objectTemplateRef oid="5b23b0d3-0740-47a1-932d-c5a4ab513bc4" /></p><p class=MsoNormal></reaction></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>User Template:</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><mapping></p><p class=MsoNormal> <description>Clean out department</description></p><p class=MsoNormal> <strength>strong</strength></p><p class=MsoNormal> <target></p><p class=MsoNormal> <path>$user/extension/ndsuPrimaryJobTitle</path></p><p class=MsoNormal> </target></p><p class=MsoNormal> <expression></p><p class=MsoNormal> <script></p><p class=MsoNormal> <code>null</code></p><p class=MsoNormal> </script></p><p class=MsoNormal> </expression></p><p class=MsoNormal></mapping></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>No errors are thrown, it's just that the title element remains populate</p><p class=MsoNormal>with the last know value when the user is deleted from the resource.</p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks,</p><p class=MsoNormal>Richard</p><p class=MsoNormal>_______________________________________________</p><p class=MsoNormal>midPoint mailing list</p><p class=MsoNormal>midPoint@lists.evolveum.com</p><p class=MsoNormal>https://lists.evolveum.com/mailman/listinfo/midpoint</p><p class=MsoNormal><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p></div></body></html>