[midPoint] New notification, need to verify my code
Pavol Mederly
mederly at evolveum.com
Mon Jan 25 17:10:08 CET 2016
Hello Jason,
I'm sorry, this mail slipped out of my view.
As for your question about ordering of notifications: generally yes, notifications are sent after changes were made. There are two kinds of notifications that might be of interest here:
- "focal object" (model-level) notifications
- resource object (provisioning-level) notifications
The former are related to changes in focal objects - users, roles, and orgs. They are invoked by model, among model hooks, in the FINAL stage - i.e. after all the changes were made.
The latter are related to changes in resource objects. They are invoked by the provisioning module. Again, they are invoked after operation attempt has been carried out - either successfully, unsuccessfully, or unsuccessfully with the hope of eventual sucess. You can differentiate between these states by looking at operationStatus field: it is either SUCCESS, FAILURE, or IN_PROGRESS, respectively.
Back to your code. Requestee is the focal object that the operation deals with (typically, the user). Your expression returns the current administrative status of this user.
If it's used within the context of a focal object notification, it displays the new status of the object (an exception is the DELETE operation, where it would show the original status).
But if it's used within the context of a resource object notification, it displays the status of the user object just after the resource object (account) operation was carried out. So it is *not* the final state. Imagine e.g. that there would be a "disable account" operation, followed by inbound mapping of newly changed value of account's administrativeStatus to user's administrativeStatus. In this case, the notification would show the original vlaue of the user's administrativeStatus. (But, this example is perhaps too artificial to be present in real life.)
Hope this helps (at least a bit...)
Pavol
----- Original Message -----
From: "Jason Everling" <jeverling at bshp.edu>
To: "midPoint General Discussion" <midpoint at lists.evolveum.com>
Sent: Tuesday, November 10, 2015 8:17:46 PM
Subject: [midPoint] New notification, need to verify my code
I tested the below code and it seems to work but I just wanted to verify I am using it correctly. Also, notification are the last item to process correct, after all changes have been made to the account?
Snippet from body expression code:
"Status: " + requestee?.getActivation()?.getAdministrativeStatus() + " \n" +
Thanks!
JASON
CONFIDENTIALITY NOTICE:
This e-mail together with any attachments is proprietary and confidential; intended for only the recipient(s) named above and may contain information that is privileged. You should not retain, copy or use this e-mail or any attachments for any purpose, or disclose all or any part of the contents to any person. Any views or opinions expressed in this e-mail are those of the author and do not represent those of the Baptist School of Health Professions. If you have received this e-mail in error, or are not the named recipient(s), you are hereby notified that any review, dissemination, distribution or copying of this communication is prohibited by the sender and to do so might constitute a violation of the Electronic Communications Privacy Act, 18 U.S.C. section 2510-2521. Please immediately notify the sender and delete this e-mail and any attachments from your computer.
_______________________________________________
midPoint mailing list
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/20160125/959a60eb/attachment.htm>
More information about the midPoint
mailing list