<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;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
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;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:"Courier New";}
.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 style='margin-left:4.8pt'><span class=DefaultFontHxMailStyle>Ah ok, I saw in the email “</span>We want to keep historic Records” so I was thinking that, the object template on deleted actions should work, we use templates on deleted. Is the value sync’d from another resource? Have you tried just <value></value> or <value>’’</value> instead? We don’t remove any values in deleted action template but do other things.<span class=DefaultFontHxMailStyle><span style='font-family:"Calibri",sans-serif'><o:p></o:p></span></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 12:56 PM<br><b>To: </b><a href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</a><br><b>Subject: </b>Re: [midPoint] How to blank out user properties?</p></div><p class=MsoNormal><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><div><p class=MsoNormal>I've seen your archive example. I wasn't completely clear. I don't want to archive the old value. I just want it gone. I want to keep the user object though. So if I were to leave NDSU, we would want there to still be the name, employee number, etc to remain. But my title would no longer apply. A bigger deal if I were to become a student, we wouldn't want my job title applied to my AD object for instance as it wouldn't be applicable. Just trying to get the value back to null.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>On Thu, 2020-07-02 at 12:22 -0500, Jason Everling wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #729FCF 1.5pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal style='margin-left:4.8pt'><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 style='margin-left:4.8pt'><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:4.8pt'><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 style='margin-left:4.8pt'><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal style='margin-left:4.8pt'><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?<o:p></o:p></p></div><p class=MsoNormal style='margin-left:4.8pt'><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:4.8pt'>I'm reading a list of our employees from a DB through a<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'>DatabaseTableConnector resource. As part of that process I'm setting a<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'>custom schema element that is their title. That's fine. However, when<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'>they are no longer employed, they disappear from the database table.<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'><o:p> </o:p></p><p class=MsoNormal style='margin-left:4.8pt'>So I'm trying to blank out the title property, since if they aren't<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'>employed anymore, they don't have a title. We want to keep historic<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'>records, and they may still be a student, which we wouldn't populate a<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'>title.<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'><o:p> </o:p></p><p class=MsoNormal style='margin-left:4.8pt'>How does one go about doing this? It was suggested using an object<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'>template on the deleted situation, but that doesn't appear to be<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'>working.<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'><o:p> </o:p></p><p class=MsoNormal style='margin-left:4.8pt'>Resource:<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'><o:p> </o:p></p><p class=MsoNormal style='margin-left:4.8pt'><reaction><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> <situation>deleted</situation><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> <synchronize>true</synchronize><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> <action><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> <handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'>-3#unlink</handlerUri>;<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> </action><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> <objectTemplateRef oid="5b23b0d3-0740-47a1-932d-c5a4ab513bc4" /><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'></reaction><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'><o:p> </o:p></p><p class=MsoNormal style='margin-left:4.8pt'>User Template:<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'><o:p> </o:p></p><p class=MsoNormal style='margin-left:4.8pt'><mapping><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> <description>Clean out department</description><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> <strength>strong</strength><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> <target><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> <path>$user/extension/ndsuPrimaryJobTitle</path><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> </target><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> <expression><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> <script><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> <code>null</code><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> </script><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'> </expression><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'></mapping><o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'><o:p> </o:p></p><p class=MsoNormal style='margin-left:4.8pt'>No errors are thrown, it's just that the title element remains populate<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'>with the last know value when the user is deleted from the resource.<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'><o:p> </o:p></p><p class=MsoNormal style='margin-left:4.8pt'>Thanks,<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'>Richard<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'>_______________________________________________<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'>midPoint mailing list<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'>midPoint@lists.evolveum.com<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'>https://lists.evolveum.com/mailman/listinfo/midpoint<o:p></o:p></p><p class=MsoNormal style='margin-left:4.8pt'><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p><pre>_______________________________________________</pre><pre>midPoint mailing list</pre><pre><a href="mailto:midPoint@lists.evolveum.com">midPoint@lists.evolveum.com</a></pre><pre><a href="https://lists.evolveum.com/mailman/listinfo/midpoint">https://lists.evolveum.com/mailman/listinfo/midpoint</a></pre></blockquote><pre style='margin-left:4.8pt'><o:p> </o:p></pre><p class=MsoNormal><span class=DefaultFontHxMailStyle><o:p> </o:p></span></p></div></body></html>