[midPoint] HA: Changes set to secodaryDelta doesn't applyes

Pavol Mederly mederly at evolveum.com
Tue May 26 10:26:11 CEST 2015


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] от имени Pavol Mederly [mederly at evolveum.com]
> Отправлено: 26 мая 2015 г. 11:00
> Кому: 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
>> http://lists.evolveum.com/mailman/listinfo/midpoint
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20150526/d05274f4/attachment.htm>


More information about the midPoint mailing list