[midPoint] Sample notification for accounts that have been enabled

Jason Everling jeverling at bshp.edu
Fri Feb 27 16:39:29 CET 2015


Thanks for the clarification,

So is it on the modify operation I am assuming. Wouldn't that send a
notification for every modify like phone or department, I just really want
the activation part of it, the enable/disable and if any of the other
auxiliaries are changed. I would use a body expression to specify the
message so that the un-needed items are not present, something like this
but wouldn't it send for every modify like stated above?

    <handler>
        <expressionFilter>
            <script>
<code>
event.isUserRelated() &&
requestee.getCostCenter() == 'ASHIT'
                </code>
            </script>
        </expressionFilter>
        <simpleUserNotifier>
            <name>Account Modified</name>
            <operation>modify</operation>
            <status>success</status>
            <recipientExpression>
                <script>
                    <code>
                       basic.getExtensionPropertyValue(requestee, '
http://www.bshp.edu/xml/ns/public/bshp', 'otherMailbox')
          </code>
                </script>
            </recipientExpression>
            <watchAuxiliaryAttributes>true</watchAuxiliaryAttributes>
            <subjectExpression>
                <script>
                    <code>"Your Account has been modified"</code>
                </script>
            </subjectExpression>
            <bodyExpression>
                <script>
                    <code>
                        "Some message to the student/faculty or staff" +








On Fri, Feb 27, 2015 at 4:39 AM, Pavol Mederly <mederly at evolveum.com> wrote:

>  Hello Jason,
>
> activation/administrativeStatus is among attributes that are "watched" by
> default.
>
> So, if you change it, you'll get a notification - like this:
>
> ============================================ Fri Feb 27 11:30:45 CET 2015
> Message{to='[aaa at aaa.sk]', subject='Account modification notification',
> contentType='null', body='Notification about account-related operation
>
> User: Boss1 (boss1, oid 75f2806d-e31b-40c9-8133-85ed4d9e6252)
> Notification created on: Fri Feb 27 11:30:45 CET 2015
>
> Resource: Localhost CSVfile (oid ef2bc95b-76e0-48e2-86d6-3d4f02d3fafe)
> Account: boss1
>
> The account has been successfully modified on the resource. Modified
> attributes are:
>  - Activation/Administrative Status:
>    - REPLACE: DISABLED
>
> '}
>
> Actually, you can use watchAuxiliaryAttributes, but this would lead to
> providing unimportant messages and/or attributes in them. For example, when
> I enabled it, like this:
>
>   <notificationConfiguration>
>       <handler>
>          <simpleResourceObjectNotifier>
>             <recipientExpression>
>                <value>aaa at aaa.sk</value>
>             </recipientExpression>
> *            <watchAuxiliaryAttributes>true</watchAuxiliaryAttributes>*
>             <transport>mail</transport>
>          </simpleResourceObjectNotifier>
>       </handler>
>       <mail>
>          <debug>false</debug>
>          <redirectToFile>notifications.txt</redirectToFile>
>       </mail>
>    </notificationConfiguration>
>
> I'll get the following notification after re-enabling the account again:
>
> ============================================ Fri Feb 27 11:31:40 CET 2015
> Message{to='[aaa at aaa.sk]', subject='Account modification notification',
> contentType='null', body='Notification about account-related operation
>
> User: Boss1 (boss1, oid 75f2806d-e31b-40c9-8133-85ed4d9e6252)
> Notification created on: Fri Feb 27 11:31:40 CET 2015
>
> Resource: Localhost CSVfile (oid ef2bc95b-76e0-48e2-86d6-3d4f02d3fafe)
> Account: boss1
>
> The account has been successfully modified on the resource. Modified
> attributes are:
>  - Activation/Administrative Status:
>    - REPLACE: ENABLED
>  - Activation/enableTimestamp:
>    - REPLACE: 27.2.2015 11:31:40
>  - Metadata/modifyChannel:
>    - REPLACE:
> http://midpoint.evolveum.com/xml/ns/public/gui/channels-3#user
>  - Metadata/modifyTimestamp:
>    - REPLACE: 27.2.2015 11:31:40
>  - Metadata/modifierRef:
>    - REPLACE: administrator (user)
>
> '}
>
> Just BTW, these attributes are currently considered auxiliary:
>
> - metadata container
> - activation/validityStatus
> - activation/validityChangeTimestamp
> - activation/effectiveStatus (this is not the same as
> administrativeStatus!)
> - activation/disableTimestamp
> - activation/enableTimestamp
> - activation/archiveTimestamp
> - iteration
> - iterationToken
> - linkRef (for focal objects)
> - trigger
>
> And these are considered synchronization-related (notifications for them
> are also disabled by default):
>
> - synchronizationSituation
> - synchronizationSituationDescription
> - synchronizationTimestamp
> - fullSynchronizationTimestamp
>
> Hope this helps,
> Pavol
>
>
> On 26. 2. 2015 15:36, Jason Everling wrote:
>
>  Would you happen to have a sample or provide one for use the watchAuxiliaryAttributes in a notification?
>
> What I was mainly looking for is a way to send a notification when the activation/administrativeStatus has changed for an account. I have my other notifiers for account adds but this would make a wonderful addition so when withdrawn students return they would get a notification letting them know their accounts have been re-enabled.
>
> 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 listmidPoint at lists.evolveum.comhttp://lists.evolveum.com/mailman/listinfo/midpoint
>
>
>
> _______________________________________________
> midPoint mailing list
> midPoint at lists.evolveum.com
> http://lists.evolveum.com/mailman/listinfo/midpoint
>
>

-- 


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. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20150227/0ad4fab9/attachment.htm>


More information about the midPoint mailing list