[midPoint] Scripted Hook v4.0 createModificationAdd missing

Keith Hazelton hazelton at internet2.edu
Fri Oct 18 18:16:22 CEST 2019


Could someone at Evolveum send a few sentences to the list about problems for which the Prism construct is the best solution? Are there any caveats about its use?

           Regards,  Keith (hazelton at internet2.edu)
________________________________
From: Keith Hazelton <keith.hazelton at wisc.edu>
Sent: Friday, October 18, 2019 12:24 AM
To: Keith Hazelton <hazelton at internet2.edu>
Subject: FW: [midPoint] Scripted Hook v4.0 createModificationAdd missing


________________________________
From: midPointOn Behalf OfNico
Sent: Friday, October 18, 2019 12:23:35 AM (UTC-06:00) Central Time (US & Canada)
To: midPoint General Discussion
Subject: Re: [midPoint] Scripted Hook v4.0 createModificationAdd missing

Hi Pavol,
thanks for the link. I have get it working now.
This is what i changed:
Old pre v4.0:
assignmentDelta = ContainerDelta.createModificationAdd(UserType.F_ASSIGNMENT, UserType, prismContext, assignment);
New:
assignmentDelta = prismContext.deltaFactory().container().createModificationAdd(UserType.F_ASSIGNMENT, UserType,assignment)

Kind regards
Nico Pätzelt

Am Do., 17. Okt. 2019 um 10:59 Uhr schrieb Pavol Mederly <mederly at evolveum.com<mailto:mederly at evolveum.com>>:

Hello Nico,

you're right. The wiki should be (eventually) updated.

In the meanwhile please see https://wiki.evolveum.com/display/midPoint/Prism+API+migration+notes. For delta creation, the delta builder is the correct way to go.

Best regards,

Pavol Mederly
Software developer
evolveum.com<http://evolveum.com>


On 16.10.2019 13:29, Nico wrote:
Hello,

i have updated our midpoint testsystem from 3.8 to 3.9 and now to 4.0.
And now i have an error occurs in the scripted hook section.

I have looked up the example:
https://wiki.evolveum.com/display/midPoint/Scripting+Hooks

Here it says:
assignmentDelta = ContainerDelta.createModificationAdd(UserType.F_ASSIGNMENT, UserType.class, prismContext, assignment);
modelContext.getFocusContext().swallowToPrimaryDelta(assignmentDelta);

This is not working anymore in 4.0. I checked the docs at https://evolveum.com/downloads/midpoint/4.0/midpoint-api-4.0-javadoc/com/evolveum/midpoint/prism/delta/ContainerDelta.html
but the method createModificationAdd is missing.

So i can't get it running. Maybe someone can give me a tipp? The wiki article need's to be updated too i think.

Kind regards
Nico Pätzelt





_______________________________________________
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 --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20191018/e42101ec/attachment.htm>


More information about the midPoint mailing list