<div dir="ltr"><div>Hello list,</div><div><br></div><div>I need to check and clear some invalid values in our user extension properties. I have done a bulk action script for this, but I'm failing at creating the delta. I have tried two approaches, but they both fail with an IllegalArgumentException<br></div><div>1)<br></div><div><div>def delta = DeltaBuilder.deltaFor(UserType.class, prismContext)<br> .item("nickName").replace(new PolyString(alias))</div><div> .item("extension/aliasEmail").delete(alias)<br></div><div> .asObjectDelta(input.oid);<br>midpoint.modifyObject(delta);</div><div><br></div><div>2)<br></div></div><div>def delta = DeltaBuilder.deltaFor(UserType.class, prismContext)<br> .item("nickName").replace(new PolyString(alias))<br> .asObjectDelta(input.oid);<br>delta.addModification(DeltaBuilder.deltaFor(ExtensionType.class, prismContext).item("aliasEmail")</div><div> .delete(alias).asItemDelta());<br>midpoint.modifyObject(delta);</div><div><br></div><div>The exception:</div><div><br></div><div><span class="gmail-message">2019-05-30T17:07:23.644 ERROR
[com.evolveum.midpoint.model.common.expression.script.ScriptExpression]
(http-nio-8080-exec-5) Expression error:
java.lang.IllegalArgumentException: Undefined or dynamic path:
aliasEmail in: CTD ({.../common/common-3}ExtensionType) in in
'execute-script' action</span></div></div>