<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Interesting.<br>
<br>
Current.diff is the correct method to compute the delta that
removes the assignments. <br>
AddSecondaryDelta() seems to be the correct method to incorporate
the delta to the context.<br>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
SwallowToSecondaryDelta() deals with ItemDelta, not an ObjectDelta
- so it's not suitable in this case.<br>
<br>
Isn't the problem in that secondary delta gets recomputed before
execution? Your configuration + log would be helpful in
diagnosing.<br>
<br>
Pavol<br>
<br>
</div>
<blockquote
cite="mid:23F96C83E30B7E4DA253EBD07C550836014CF6C6@EX-MB2.solar.local"
type="cite">
<pre wrap="">I tryied to debug. This method calls com.evolveum.midpoint.model.impl.lens.LensElementContext#addSecondaryDelta with properly attributes, but method swallowToSecondaryDelta of that object doesn't calls. It seems I should set delta to another object.
________________________________________
От: midPoint [<a class="moz-txt-link-abbreviated" href="mailto:midpoint-bounces@lists.evolveum.com">midpoint-bounces@lists.evolveum.com</a>] от имени Pavol Mederly [<a class="moz-txt-link-abbreviated" href="mailto:mederly@evolveum.com">mederly@evolveum.com</a>]
Отправлено: 26 мая 2015 г. 11:00
Кому: <a class="moz-txt-link-abbreviated" href="mailto:midpoint@lists.evolveum.com">midpoint@lists.evolveum.com</a>
Тема: Re: [midPoint] Changes set to secodaryDelta doesn't applyes
Hello,
this is from a model hook? I never used that hooks, but my intuition
says that beware of changing objects in the model context (the first
line); create a clone before that.
If that does not help, enable logging for model (either the whole model,
or projector + change executor only) and see what happens. If you would
need help with that, post the log here.
Or maybe someone else would have a better idea :)
Regards,
Pavol
On 26. 5. 2015 9:48, Алексей Ващенков wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Hello.
I need to remove all roles after user fired.
I wrote the code
focus.assignment.removeAll(rolesToDelete);
current = modelController.getObject(UserType.class, focus.oid, null, task, result);
delta = current.diff(focus.asPrismObject(), true, true);
context.engineScope.get("modelContext").focusContext.addSecondaryDelta(delta)
The delta evaluated properly, but it doesn't applies to user.
Where am I wrong?
_______________________________________________
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>
<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>
_______________________________________________
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>