Oracle BPEL PM 10.1.3 – Sending an Email to multiple recipients

Lucas Jellema
0 0
Read Time:1 Minute, 25 Second

It might just be the smallest topic I have ever blogged about. But then again, it took me some time to figure this out, so I figured I might as well share it with you. Here is the situation: while preparing a proof of concept with Oracle BPEL Process Manager 10.1.3 (the SOA Suite Preview now available on OTN), I wanted my BPEL process to send an email, not just to a single adressee, but to a list of recipients. The BPEL variables contained the information of the email-adresses, but I did not know how to pass the information to the notification service: did I have to pass a NodeList, a semi-colon separated list, a comma or space separated list of email adresses? Or was it not possible at all to send emails to multiple recipients in the To:, CC: or BCC: fields?

 

....
 

Well it turned out to be quite simple: the cc-field in the EmailPayload of the Notification Service takes a String. If that String contains a comma separated list of email-addresses, it will send emails to each of the adresses in that list. For example: gerwin@localhost,rogier@localhost. The BPEL section that sets the CC item is nothing more complex than:

<copy>
<from expression="bpws:getVariableData('NieuweBoekAanvraag'
,'BoekAanvragenCollection'
,'/ns3:BoekAanvragenCollection/ns3:BoekAanvragen[1]/ns3:emailGeinteresseerden')"/>
<to variable="varNotificationReq" part="EmailPayload"
query="/EmailPayload/ns2:Cc"/>
</copy>

The emailGeinteresseerden is a field of time xsd:string, that is populated by reading from a database record. The field contain a simple, comma separated string. It is that simple.

About Post Author

Lucas Jellema

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director and Oracle Developer Champion. Solution architect and developer on diverse areas including SQL, JavaScript, Kubernetes & Docker, Machine Learning, Java, SOA and microservices, events in various shapes and forms and many other things. Author of the Oracle Press book Oracle SOA Suite 12c Handbook. Frequent presenter on user groups and community events and conferences such as JavaOne, Oracle Code, CodeOne, NLJUG JFall and Oracle OpenWorld.
Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %
Next Post

ADF Faces: The InputTextHyperlink Component

Many pages developed with ADF Faces will contain items that represent hyperlinks. The user can enter a URL in such items and submit the value. However, the contents of such an item is not just text: it is potentially a hyperlink. Now would it not be user friendly to allow […]
%d bloggers like this: