<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><font face="Roboto">Hi,</font></p>
<p><font face="Roboto">I have to send a notification when some </font>roles
are assigned or removed.<br>
These roles are particular entitlements from an AD and they all
have a prefix in their name (REF_<roleName>), they are more
or less 60 roles.<br>
I'm trying to use a GeneralNotifier, using the expressionFilter
for filtering theese particular events.</p>
<p> I saw that i can find the Delta using the event with <br>
</p>
<p>delta = ObjectDelta.summarize(((ModelEvent)
event).getFocusDeltas());</p>
<p>but from here I cannot find the name of the roles involved in the
modifications...</p>
<p>I tryed:</p>
import
com.evolveum.midpoint.notifications.impl.NotificationFuctionsImpl;<br>
import
com.evolveum.midpoint.notifications.impl.formatters.TextFormatter;
<p>def textFormatter = new TextFormatter();<br>
def NotificationFuctionsImpl = new NotificationFuctionsImpl();<br>
def hiddenPaths = NotificationFunctionsImp.getAuxiliaryPaths(); <br>
</p>
<p> def formattedDelta =
textFormatter.formatObjectModificationDelta(delta, hiddenPaths,
false);</p>
<p>Now, removing a role, the
textFormatter.formatObjectModificationDelta works and I can detect
what roles are involved (if any), but adding a role, provoke a
nullPointerException...<br>
<br>
This is the stackTrace. <br>
<a class="moz-txt-link-freetext" href="https://pastebin.com/jsK2KRNy">https://pastebin.com/jsK2KRNy</a><br>
<br>
<br>
Is there an alternatives in doing this? How can I detect if a
subset of roles is involved during an user modification?<br>
<br>
Thank you,<br>
Marco</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>