cancel
Showing results for 
Search instead for 
Did you mean: 

Create Service CAF for send email

Former Member
0 Kudos

Friends,

I've to create a service-CAF that send email.

I'll disable the default of BPM email notifications and put one WS for do it.

Does anyone have any experience with it?

[]´

Accepted Solutions (0)

Answers (1)

Answers (1)

martin_moeller
Contributor
0 Kudos

Hi Tulio,

Why not implementing a simple JEE5 web service for this? AFAIK there is no need to warp this into CAF as the CE stack would also allow you doing so with a simple POJO + annotations.

Within your implementation you could access the standard java.mail APIs. Simply make sure that you set its properties accordingly in the java mail service setttings of the engine (NWA > Configuration Management > Infrastructure > Java System Properties - if I recap this correctly).

So in theory (I did not do it myself yet) this should be a "no-brainer"

As soon as it is deployed and set up correctly on the CE stack you could access the WSDL via the WS navigator (or via the SOA configuration), import it to your process project and make use of it in automated activities.

-


Another - interesting - option would be using the EJB functions for this. I would imagine modelling the interface this way:

boolean sendMail(String to, String title, String subject, String body)

You could then use this in some (input or output) mapping and pass in some values. In addition the function will return a boolean (or maybe a String) that could tell you the outcome of sending out the mail (so that you know if it worked technically - this does not necessarily mean that the mail reached the recipient - that's depending on infrastructure and SPAM filters

The more I type the more I like this idea - maybe I find two minutes to write some short document for this

Cheers,

Martin

Former Member
0 Kudos

Thanks Martin!

I will try do it. I hope that it work!

But I will show for you my doubt:

I have a model of BPM with their Tasks.

Each of these Tasks automatically sends an email when completed.

These automatic emails are sent to people that are lists rules. OK?

I'd like to select which task I want to send email, because is not necessary to send email all times and in all tasks.

Also I wanna to customize the email as there is an option in Guided Procedure.

You know how you can help me?

Former Member
0 Kudos

Hi Tulio,

For achieving the desired functionality, you have to disable the Automatic Notifications and you can create a custom Web Service based on Java Mail to trigger emails, you can trigger this service in tasks that you want so that you have control over the notifications sent.

Hope this helps!!

Cheers,

Arafat

Former Member
0 Kudos

Hello Arafat,

thank a lot for the help !!

It will helpful, but just one more help.

May you indicate/give me a tutorial or How to create this "custom Web Service based on Java Mail to trigger email".

cheers buddy