<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Hi Ivan,
<div class=""><br class="">
</div>
<div class="">Thank you for your answer,</div>
<div class=""><br class="">
</div>
<div class="">We would like to deal with account lifecycle with the rules and validity dates applied to assignment.</div>
<div class="">How could we write our objectTemplate mapping to apply these dates ?</div>
<div class=""><br class="">
</div>
<div class="">Could we do this directly using expression and assignmentTargetSearch or do we have to do this with script code as we begin to do in this snippet :</div>
<div class=""><br class="">
</div>
<div class=""><a href="http://pastebin.com/ftsgzvZs" class="">http://pastebin.com/ftsgzvZs</a></div>
<div class=""><br class="">
</div>
<div class="">Is there a method to set the validity dates ? Like assignment.setValidityFrom or something like that ?</div>
<div class=""><br class="">
</div>
<div class="">Thanks !</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""></div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">Le 14 déc. 2016 à 11:42, Ivan Noris <<a href="mailto:ivan.noris@evolveum.com" class="">ivan.noris@evolveum.com</a>> a écrit :</div>
<br class="Apple-interchange-newline">
<div class="">
<div bgcolor="#FFFFFF" text="#000000" class="">
<p class="">Hi,</p>
<p class="">by default, if you unassign (last) role which represents the account, the account would be deleted.</p>
<p class="">If you assign the roles automatically in object templates, by some condition e.g. employee status, it would work automatically.</p>
<p class="">On the other way midPoint can be configured to unassign roles, but not to delete the accounts, but disable them. Or disable them and delete later (in 30 days for example). See here:
<a class="moz-txt-link-freetext" href="https://wiki.evolveum.com/display/midPoint/Resource+Schema+Handling%3A+Activation">
https://wiki.evolveum.com/display/midPoint/Resource+Schema+Handling%3A+Activation</a></p>
<p class="">But if you wish to unassign all roles (regardless if they were assigned automatically by template or manually), this could be more complicated.</p>
<p class="">Ivan<br class="">
</p>
<div class="moz-cite-prefix">On 12/14/2016 11:04 AM, HURTEVENT VINCENT wrote:<br class="">
</div>
<blockquote cite="mid:0E125049-578B-415E-B525-4FCDCBD2564E@univ-lyon1.fr" type="cite" class="">
<pre wrap="" class="">Hello,

We’re working on a PoC for our university with the creation of directories accounts with the informations provided by our upstream ressources (HR and student information systems).

As many of our people have several profiles, mainly staff and student, it appears that working with intent is a good solution. So we began to write our process : one user, several intent, and objectTemplates which define assignments which induce accounts in downstream directories.

When a people comes from upstream with a specific profile, for the exemple staff and student, we assign the staff Role and the student Role and the 2 accounts are well created in the downstream directories.

Now, we would like in reaction to a deleted situation in a specific upstream ressources, to keep the user in Midpoint but unassign roles and potentially assign specific roles which could lead to specific manipulation on accounts (disable on AD, modify attributes, etc).

We look at activation status but we don’t really understand how to use it with specific intent. Validity dates will be different between the staff contract dates and the student registration dates for example.

Is there a simple way to define in ressources, an unassign action in reaction to a deleted situation ?

Thank you,</pre>
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset> <br class="">
<pre wrap="" class="">_______________________________________________
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 class="">
<pre class="moz-signature" cols="72">-- 
Ivan Noris
Senior Identity Engineer
<a href="http://evolveum.com" class="">evolveum.com</a>
</pre>
</div>
_______________________________________________<br class="">
midPoint mailing list<br class="">
<a href="mailto:midPoint@lists.evolveum.com" class="">midPoint@lists.evolveum.com</a><br class="">
http://lists.evolveum.com/mailman/listinfo/midpoint<br class="">
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>