<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 Ilya,<br>
<br>
This works a bit differently in midPoint. We do not have separate
policies for automatic assignment and unassignemnt. These are the
same. Therefore simply use mapping in user template that
automatically adds an assignment. And specify a condition when
user should have such an assignment. E.g.<br>
<br>
<objectTemplate><br>
...<br>
<mapping><br>
<expression> .... assignment here ...
</expression><br>
<target><path>assignment</path></target><br>
<condition><br>
<script><br>
<code>employeeType == 'active'</code><br>
</script><br>
</condition><br>
</mapping><br>
<br>
Now, this works both for assignment and unassignment. If this user
does not have such assignment and his employeeType changes to
'active' then the assignment will be added. But if user already
has employeeType='active' and this changes to something else then
the assignment will be removed.<br>
<br>
MidPoint works with relative changes. This means that after every
change in user attributes midPoint recomputes all the mappings and
figures out what are the resulting (secondary) changes. E.g. if
employeeType attribute changes from 'active' to 'inactive' then
midPoint realizes that the condition in this particular mapping
changes from true to false. Which means that the user should have
the assignment given by this mapping before the change, but this
user should NOT have the assignment after the change. Therefore
midPoint removes the assignment.<br>
<br>
<pre class="moz-signature" cols="72">--
Radovan Semancik
Software Architect
evolveum.com
</pre>
<br>
<br>
<br>
On 05/18/2015 01:02 PM, Илья Дорофеев wrote:<br>
</div>
<blockquote
cite="mid:F82253638486D44DABA51EC404D48AF3846329@EX-MB1.solar.local"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style id="owaParaStyle">P {
MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
</style>
<div style="direction: ltr;font-family: Tahoma;color:
#000000;font-size: 10pt;">
<div>
<p>Hi,</p>
<p> </p>
<p>I would like to adjust a policy that will automatically
revoke all user's assignments (or just some of them selected
by a rule) in accordance with particular values of some user
properties. For instance, I would like all the fired users
have their assignments revoked. I didn't find any mentions
in docs of how it is supposed to be configured.</p>
<p> </p>
<p>Thanks in advance,</p>
<p>Ilya Dorofeev</p>
</div>
</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>
</body>
</html>