<div dir="ltr"><div>Hi Pavol,</div><div>thanks for the link. I have get it working now.</div><div>This is what i changed:</div><div>Old pre v4.0:</div><div> assignmentDelta = ContainerDelta.createModificationAdd(UserType.F_ASSIGNMENT, UserType, prismContext, assignment);</div><div>New:</div><div> assignmentDelta = prismContext.deltaFactory().container().createModificationAdd(UserType.F_ASSIGNMENT, UserType,assignment)</div><div><br></div><div>Kind regards</div><div>Nico Pätzelt<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Do., 17. Okt. 2019 um 10:59 Uhr schrieb Pavol Mederly <<a href="mailto:mederly@evolveum.com">mederly@evolveum.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>Hello Nico,</p>
<p>you're right. The wiki should be (eventually) updated.<br>
</p>
<p>In the meanwhile please see <a href="https://wiki.evolveum.com/display/midPoint/Prism+API+migration+notes" target="_blank">https://wiki.evolveum.com/display/midPoint/Prism+API+migration+notes</a>.
For delta creation, the delta builder is the correct way to go.</p>
<p>Best regards,<br>
</p>
<pre cols="72">Pavol Mederly
Software developer
<a href="http://evolveum.com" target="_blank">evolveum.com</a>
</pre>
<div>On 16.10.2019 13:29, Nico wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hello,</div>
<div><br>
</div>
<div>i have updated our midpoint testsystem from 3.8 to 3.9 and
now to 4.0.</div>
<div>And now i have an error occurs in the scripted hook
section.<br>
</div>
<div>
<div>
<div><br>
</div>
<div>I have looked up the example:<br>
</div>
<div><a href="https://wiki.evolveum.com/display/midPoint/Scripting+Hooks" target="_blank">https://wiki.evolveum.com/display/midPoint/Scripting+Hooks</a></div>
<div><br>
</div>
<div>Here it says:</div>
<div>
<div><code></code><code>assignmentDelta =
ContainerDelta.createModificationAdd(UserType.F_ASSIGNMENT,
UserType.class, prismContext, assignment);</code></div>
<div><code>modelContext.getFocusContext().swallowToPrimaryDelta(assignmentDelta);</code></div>
<div><code><br>
</code></div>
<div><code>This is
not working anymore in 4.0. I checked the docs at <a href="https://evolveum.com/downloads/midpoint/4.0/midpoint-api-4.0-javadoc/com/evolveum/midpoint/prism/delta/ContainerDelta.html" target="_blank">https://evolveum.com/downloads/midpoint/4.0/midpoint-api-4.0-javadoc/com/evolveum/midpoint/prism/delta/ContainerDelta.html</a>
<br>
</code></div>
<div><code>but the
method createModificationAdd is missing.</code></div>
<div><code><br>
</code></div>
<div><code>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.</code></div>
<div><code><br>
</code></div>
<div><code>Kind
regards <br>
</code></div>
<div><code>Nico
Pätzelt<br>
</code></div>
<div><code><br>
</code></div>
<div><code><br>
</code></div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
midPoint mailing list
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a>
</pre>
</blockquote>
</div>
_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="http://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">http://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
</blockquote></div>