Quantcast
Channel: SCN : All Content - SAP Business Process Management
Viewing all articles
Browse latest Browse all 887

How to send notification to multiple users in BPM

$
0
0
I would like to show you how you can send a Notification activity to multiple users in BPM Process modeling.
Steps:
1. First you have to create a Data Object that you will keep the user IDs during your process flow.
In my example the data object is called "DataStore" and the element to store the user IDs called "MailUsers" of type string 0..* occurrences.
Capture1.JPG

2. Then create a custom Expression Function.

Right click on Functions -> New Expression Function.

Capture.JPG

Give the name "GetPrincipalID" and add the parameter "Principal_In" of type Principal.

Capture2.JPG

Press the Expression tab and enter:

Principal_In/principalId

Capture3.JPG

Capture4.JPG

3. Then you can append user IDs in the "MailUsers" element during your process through mapping (eg. Output Mapping of a human activity).
Add the following expression to "MailUsers" by double-clicking it (in red you enter each time the ID of the user you want to append in the element of the data object).
GetPrincipalID(getPrincipalByUniqueName("BPM_TestUser","user"))
After that, right-click "MailUsers" and select Assignment -> Append.
Capture3.JPG
4. Finally, create the Notification activity and go to Properties -> To -> Use an expression and enter the following:
getPrincipals(DataStore/MailUsers)

 

Capture4.JPG


Viewing all articles
Browse latest Browse all 887

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>