[midPoint] Custom Event - notificationManager
Sylvaire kevin TIPA
sylvaire-kevin.tipa at mythalesgroup.io
Wed Apr 18 16:20:44 CEST 2018
Hello,
I try (so hard) to generate custom event in Java, but I get a NULL pointer exception each time...
Follow the documentation, we just have this information :
Event event = new CustomEvent(lightweightIdentifierGenerator, subtype, handler, item, operation, status, channel);
notificationManager.processEvent(event, task, result);
So I create a custom Event correctly (I think) but the process event always fail ... I'm not sure about "How I can get notificationManager object"...
I work in Hook in userType / primary. Anyone know how to generate custom event ?
See my code :
NotificationManager notificationManager = new NotificationManagerImpl() //Probably wrong !
Event event = new CustomEvent(lightweightIdentifierGenerator, "CustomUserRegistrationNotifier", null, user, EventOperationType.ADD, EventStatusType.SUCCESS, null);
notificationManager.processEvent(event)
Here the log :
Caused by: java.lang.NullPointerException: null
at com.evolveum.midpoint.notifications.impl.NotificationManagerImpl.processEvent(NotificationManagerImpl.java:102)
My event object :
>>>event CustomEvent
id: 1524061049969-0-1
requester: null
requestee: null
subtype: CustomUserRegistrationNotifier
According to the error log, the source code with problem is in https://github.com/Evolveum/midpoint/blob/80956776707531988908314f7dc1ef47a1e9b25b/model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/NotificationManagerImpl.java ligne 102 :
[https://avatars1.githubusercontent.com/u/6286905?s=400&v=4]<https://github.com/Evolveum/midpoint/blob/80956776707531988908314f7dc1ef47a1e9b25b/model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/NotificationManagerImpl.java>
Evolveum/midpoint<https://github.com/Evolveum/midpoint/blob/80956776707531988908314f7dc1ef47a1e9b25b/model/notifications-impl/src/main/java/com/evolveum/midpoint/notifications/impl/NotificationManagerImpl.java>
github.com
midpoint - MidPoint Identity Manager
Task task = taskManager.createTaskInstance(OPERATION_PROCESS_EVENT);
MP : 3.6
Cordialement.
Sylvaire-Kevin TIPA
Thales Services / OIC INFRAS
Devops Infrastructure Automation
[cid:25912ed8-c5af-43d7-91a2-e73cc3597829]
THALES SERVICES SAS
44 Quai Charles de Gaulle
CS 20100
69463 Lyon Cedex 06
--------------------------------------------------
www.thalesgroup.com<http://www.thalesgroup.com>
This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180418/063900f5/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-mubeirnh.png
Type: image/png
Size: 6112 bytes
Desc: Outlook-mubeirnh.png
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20180418/063900f5/attachment.png>
More information about the midPoint
mailing list