[midPoint] HA: HA: Changes set to secodaryDelta doesn't applyes
Алексей Ващенков
a.vashchenkov at solarsecurity.ru
Tue May 26 11:24:42 CEST 2015
System configuration is in attachments. How properly setup logs? If I enable model logger to debug, then each time hook is fired logs increase by 6MB
________________________________________
От: midPoint [midpoint-bounces at lists.evolveum.com] от имени Pavol Mederly [mederly at evolveum.com]
Отправлено: 26 мая 2015 г. 11:26
Кому: midpoint at lists.evolveum.com
Тема: Re: [midPoint] HA: Changes set to secodaryDelta doesn't applyes
Interesting.
Current.diff is the correct method to compute the delta that removes the assignments.
AddSecondaryDelta() seems to be the correct method to incorporate the delta to the context.
SwallowToSecondaryDelta() deals with ItemDelta, not an ObjectDelta - so it's not suitable in this case.
Isn't the problem in that secondary delta gets recomputed before execution? Your configuration + log would be helpful in diagnosing.
Pavol
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 [midpoint-bounces at lists.evolveum.com<mailto:midpoint-bounces at lists.evolveum.com>] от имени Pavol Mederly [mederly at evolveum.com<mailto:mederly at evolveum.com>]
Отправлено: 26 мая 2015 г. 11:00
Кому: midpoint at lists.evolveum.com<mailto:midpoint at lists.evolveum.com>
Тема: 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:
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
midPoint at lists.evolveum.com<mailto:midPoint at lists.evolveum.com>
http://lists.evolveum.com/mailman/listinfo/midpoint
_______________________________________________
midPoint mailing list
midPoint at lists.evolveum.com<mailto:midPoint at lists.evolveum.com>
http://lists.evolveum.com/mailman/listinfo/midpoint
_______________________________________________
midPoint mailing list
midPoint at lists.evolveum.com<mailto:midPoint at lists.evolveum.com>
http://lists.evolveum.com/mailman/listinfo/midpoint
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.xml
Type: text/xml
Size: 7923 bytes
Desc: config.xml
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20150526/335693eb/attachment.xml>
More information about the midPoint
mailing list