The notification functionality in SAP Identity Management 8.0 is available to you with the Notification package of the SAP Provisioning Framework. The notification package com.sap.idm.util.notification contains the notification process and the notification templates, which are used to send emails for approval and attestation tasks.

If you want to trigger a notification because of an SAP Provisioning Framework process, specify the value of the appropriate NOTIFYEVENT package constant to point to the template (a unique template ID) that you want to use: The most commonly used notification events are handled by this package:

  • NOTIFYEVENT_ASSIGNMENT_COMPLETED  –  Privilege assignment notification
  • NOTIFYEVENT_ASSIGNMENT_FAILED – Assignment failed notification
  • NOTIFYEVENT_ASSIGNMENT_REVOKED – Privilege removal notification
  • NOTIFYEVENT_PASSWORD_CHANGED – Changed password notification
  • NOTIFYEVENT_USER_MODIFIED – Modified user notification
  • NOTIFYEVENT_USERACCOUNT_CREATED – Created user notification
  • NOTIFYEVENT_USERACCOUNT_DELETED – Deleted user notification
  • NOTIFYEVENT_USERACCOUNT_DISABLED – Disabled user notification
  • NOTIFYEVENT_USERACCOUNT_ENABLED – Enabled user notification

If you need to configure a mechanism for notification for other events, such as custom process completion or in case of any error, you can use the uSendSMTPMessage internal function. In this article I will give you a simple example for triggering notification for a process completion.

1. In the Identity Management Developer Studio tree view, check out a package and create a process. Rename the process to “doSthProcess”.

/wp-content/uploads/2015/12/cm1_848162.png

2. In the process flow diagram, add an action task to the process. Rename it to ExportIdentitiesTask.

/wp-content/uploads/2015/12/cm2_848571.png

3. In the job view, select the Passes tab and choose New from the context menu. Select a pass of type ToASCII and rename it to ExportIdentitiesPass.

/wp-content/uploads/2015/12/cm3_848622.png

Open ExportIdentitiesPass pass and define as a Source MX_PERSON entry.

/wp-content/uploads/2015/12/cm4_848627.png

As for Destination define the file location, for example ‘C:\tmp\identities.txt’ and the list of attributes you need to export:

/wp-content/uploads/2015/12/cm5_848628.png

5. In the Identity Management Developer Studio tree view, select the Scripts node of the package that you have checked out and add a new package script. Enter the following name for the script: sendingIdentitiesScript.


/wp-content/uploads/2015/12/cm6_848632.png

The variable attachmentLocation points to the toASCII pass file location in this case.

You may add additional logic for the dynamically creation of either text message or subject.

An example of the script is attached to the article.

6. Go back to the job view where you have created the pass ExportIdentitiesPass. Select the Scripts tab and then select Add Link to Package Script from the context menu.

/wp-content/uploads/2015/12/cm7_848642.png

In the Connection to Package Script dialog, select Self from the Select Package drop-down menu.

/wp-content/uploads/2015/12/cm8_848644.png

Select our new script sendingIdentitiesScript in order to be able to use it in the pass.


  7. On the General tab of ExportIdentitiesPass pass, in the Termination Script drop-down menu, select sendingIdentitiesScript.

/wp-content/uploads/2015/12/cm9_848651.png

In similar way, you can define Initialization or Entry related scripts.

Now, you can test the example trough the Test Process feature and check your inbox for a new email with attachment 🙂 .

/wp-content/uploads/2015/12/cm10_848652.png

Related information you can find here :

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Patrick Aldridge

    Hi Penka,

    Thanks for this useful information.  Do you know if there is any way to leverage the Message Templates with custom notifications?  It would be great if it were possible to maintain email templates using the standard framework and then use these for any custom notifications.

    Kind regards,

    Pat

    (0) 
    1. Patrick Aldridge

      Hi Simona,

      Thanks for the suggestion.  I had seen this blog before and it looks really smart!!

      I have also raised this as an idea on the IdM ideas space as I feel it would be great to manage all notifications in the same manner.

      Kind regards,

      Pat

      (0) 

Leave a Reply