<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello Jason,<br>
<br>
I would suggest this:<br>
<br>
<mapping><br>
<expression><br>
<script><br>
<code><br>
validTo = basic.currentDateTime()<br>
validTo.add(javax.xml.datatype.DatatypeFactory.newInstance().newDuration("P30D"))<br>
validTo<br>
</code><br>
</script><br>
</expression><br>
<target><br>
<path>activation/validTo</path><br>
</target><br>
</mapping><br>
<br>
Note that <b>P30D</b> is ISO 8601 representation for a duration
of 30 days, see e.g. <a
href="http://www.w3.org/TR/xmlschema-2/#duration">http://www.w3.org/TR/xmlschema-2/#duration</a><br>
<b>basic.currentDateTime()</b> is a method from midPoint's basic
functions library (
<meta http-equiv="content-type" content="text/html; charset=utf-8">
com.evolveum.midpoint.model.common.expression.functions.BasicExpressionFunctions)<br>
<br>
Best regards,<br>
Pavol<br>
<br>
On 15. 1. 2015 16:12, Jason Everling wrote:<br>
</div>
<blockquote
cite="mid:CAFkZXY4q851YvSg01u_OVtzJo5xmBgeuUmHMHN+MSTzmKskzjQ@mail.gmail.com"
type="cite">
<div dir="ltr">I wanted to update you on this, on current master I
am able to use objectTemplate in the deleted actions without it
changing anything.
<div><br>
</div>
<div>I have a simple mapping to set expiration and the action
under the CSV is to unlink followed by the template which
works and I double-checked the user account and no other
attributes are changed. I also tested changing orgs and
updating other attributes and had same success.</div>
<div><br>
</div>
<div>I am not fluent in Java code so I had to test with a
hardcoded date and time,</div>
<div><br>
</div>
<div>How can I grab the current date/time and add lets say add
30 days to the value and use that for validTo instead of
hardcoded value ?</div>
<div><br>
</div>
<div>
<div> <name>Deleted User Template</name></div>
<div><br>
</div>
<div> <description></div>
<div> This object is used to set expiration date when
accounts are removed from CSV.</div>
<div> </description></div>
<div><span class="" style="white-space:pre"> </span></div>
<div> <mapping></div>
<div> <source></div>
<div>
<path>$user/activation/validTo</path></div>
<div> </source></div>
<div><span class="" style="white-space:pre"> </span><expression></div>
<div><span class="" style="white-space:pre"> </span><script></div>
<div><span class="" style="white-space:pre"> </span><code></div>
<div><span class="" style="white-space:pre"> </span>'2015-12-31T22:59:00.000+01:00'</div>
<div><span class="" style="white-space:pre"> </span></code></div>
<div><span class="" style="white-space:pre"> </span></script></div>
<div><span class="" style="white-space:pre"> </span></expression></div>
<div> <target></div>
<div> <path>activation/validTo</path></div>
<div> </target></div>
<div> </mapping></div>
<div><br>
</div>
<div></objectTemplate></div>
<div><br>
</div>
<div>JASON</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jan 13, 2015 at 7:53 PM, Jason
Everling <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:jeverling@bshp.edu" target="_blank">jeverling@bshp.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Thanks for the quick reply,
<div><br>
</div>
<div>I have been thinking of different ways, the easiest
way I think that would work is to just remove
inactivateFocus from the deleted situation and reference
to a objectTemplate that sets the activation/validTo
date which I see you created an issue already for a
previous question of mine a while back</div>
<div><br>
</div>
<div><a moz-do-not-send="true"
href="https://jira.evolveum.com/browse/MID-2100"
target="_blank">https://jira.evolveum.com/browse/MID-2100</a><br>
</div>
<div><br>
</div>
<div>Anyways, let me know what you find out, no rush. I am
looking forward to the next release and I am patiently
waiting while tinkering with all kinds of other useful
things midpoint can do for us!</div>
<span class="HOEnZb"><font color="#888888">
<div><br>
</div>
<div>JASON</div>
</font></span></div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Jan 13, 2015 at 3:28
PM, Ivan Noris <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:ivan.noris@evolveum.com"
target="_blank">ivan.noris@evolveum.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hi,<br>
<br>
as this seems to be quite the opposite case to
what I am normally doing, I'm discussing it with
the developers and will post a feedback to the
list once I get it.<br>
<br>
<br>
The opposite case I'm referring to is like this:
when all roles providing some account are
unassigned from the user, midPoint will normally
delete the resource account. This can be
reconfigured to disable the account, or if you
wish, to disable and then delete the account
later. This is just for reference, maybe someone
on the list will need this:
<a moz-do-not-send="true"
href="https://wiki.evolveum.com/display/midPoint/Resource+Schema+Handling%3A+Activation"
target="_blank">https://wiki.evolveum.com/display/midPoint/Resource+Schema+Handling%3A+Activation</a><br>
<br>
We use this commonly.<br>
<br>
So for your case I will try to get an answer
from the developers and see if it can be
configured or if it needs to be implemented.<br>
Thank you for understanding. Anyway it seems to
be pretty nice/usable feature.<br>
<br>
Regards,<br>
Ivan
<div>
<div><br>
<br>
<div>On 01/12/2015 04:03 PM, Jason Everling
wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">
<div>I know you all are busy getting
work done on the next release so if
this requires a lot then it can wait.</div>
<div><br>
</div>
I have a situation that I am unsure of
how to go about it, I have seen examples
of delayed delete after disabled so this
would be something like that.
<div><br>
</div>
<div>Within the main resource, a CSV
file, it will contain only active
students/faculty/staff. When a student
graduates they will no longer be in
the CSV resource thus I have under
situations to inactivateFocus, works
great, disables their accounts.</div>
<div><br>
</div>
<div>Now what I would like to do and
where I am lost and do not know where
to begin,</div>
<div><br>
</div>
<div>Instead of disabling their account
immediately, How can I changed it so
that I can add maybe a valid-to date
30 days after being deleted from the
resource instead of disabling their
accounts right a way.</div>
<div><br>
</div>
<div>Reason being, graduated students
can use their accounts up to 30 days
after graduating then we disable them.</div>
<div><br>
</div>
<div>JASON</div>
</div>
<br>
</div>
</div>
<font><br>
<br>
CONFIDENTIALITY NOTICE:<br>
This e-mail together with any attachments is
proprietary and confidential; intended for
only the recipient(s) named above and may
contain information that is privileged. You
should not retain, copy or use this e-mail
or any attachments for any purpose, or
disclose all or any part of the contents to
any person. Any views or opinions expressed
in this e-mail are those of the author and
do not represent those of the Baptist School
of Health Professions. If you have received
this e-mail in error, or are not the named
recipient(s), you are hereby notified that
any review, dissemination, distribution or
copying of this communication is prohibited
by the sender and to do so might constitute
a violation of the Electronic Communications
Privacy Act, 18 U.S.C. section 2510-2521.
Please immediately notify the sender and
delete this e-mail and any attachments from
your computer. </font><br>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
midPoint mailing list
<a moz-do-not-send="true" href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a moz-do-not-send="true" href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><span><font color="#888888">
</font></span></pre>
<span><font color="#888888"> </font></span></blockquote>
<span><font color="#888888"> <br>
<pre cols="72">--
Ing. Ivan Noris
Senior Identity Management Engineer
<a moz-do-not-send="true" href="http://evolveum.com" target="_blank">evolveum.com</a> <a moz-do-not-send="true" href="http://evolveum.com/blog/" target="_blank">evolveum.com/blog/</a>
_____________________________________________
"Semper Id(e)M Vix."
</pre>
</font></span></div>
<br>
_______________________________________________<br>
midPoint mailing list<br>
<a moz-do-not-send="true"
href="mailto:midPoint@lists.evolveum.com"
target="_blank">midPoint@lists.evolveum.com</a><br>
<a moz-do-not-send="true"
href="http://lists.evolveum.com/mailman/listinfo/midpoint"
target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</div>
<br>
<font size="2"><br>
<br>
CONFIDENTIALITY NOTICE:<br>
This e-mail together with any attachments is proprietary and
confidential; intended for only the recipient(s) named above and
may contain information that is privileged. You should not
retain, copy or use this e-mail or any attachments for any
purpose, or disclose all or any part of the contents to any
person. Any views or opinions expressed in this e-mail are those
of the author and do not represent those of the Baptist School
of Health Professions. If you have received this e-mail in
error, or are not the named recipient(s), you are hereby
notified that any review, dissemination, distribution or copying
of this communication is prohibited by the sender and to do so
might constitute a violation of the Electronic Communications
Privacy Act, 18 U.S.C. section 2510-2521. Please immediately
notify the sender and delete this e-mail and any attachments
from your computer. </font><br>
<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>
</body>
</html>