Tuesday, January 31, 2017

Actionable Email Templates in Oracle Process Cloud Service

Oracle Process Cloud Service provides you with a very convenient and easy way to configure notifications for your human tasks though the use of email notification templates.

These notification templates are defined using HTML and can include a variety of information such as payload data, task data, you can include links to perform an action on a task directly within the email and task comments. Furthermore a notification template can be re-used across your application processes.

So let's see in practice how you can create and use an email notification template.

Create a new application in Oracle Process Cloud Service, give it a name and file it under a space (I've named it "Email Templates Demo Application" under a custom space called "aantoniou").

Create also a sample process. For demo purposes I've created a process using the "Form" pattern and named it "DemoProcess".

From the component palette on the right, expand the "Human" component group and drop a submit activity between the "Start" and "End" components (I've also renamed the default submit activity to "Review Task").

Open the Human Task properties, click on "Notification" and you will see the various notifications options. You can disable notifications, select which template to use for your human task or create a new notification template.

There are currently new default templates, one with actions (that is to perform an action on a task without having to go to the Workspace application) and one with no actions that contains a link to the Workspace application.

If you click on the options of the default notification template you should see that you can preview the template, copy it or download it.

Let's create a new email template from scratch. Click on the plus button to open the "Create an Email Template" window and give your email template a name.

You can upload an existing email template or you can use the code editor to define your email template by entering HTML code.

You can include data in your email template by using "mustache templates".

You can include task related data such as the title of the task, the creator, priority, outcome, etc. For a complete list of data attributes please visit the Oracle Process Cloud  Service developer guide, chapter 7 "Creating Human Tasks", section 7-16.

Click finish to create your email template. It should now feature under the email templates section. If you click on your email template options, you should see that you have more options (in addition to preview, copy and download, you have edit and delete).

To use your newly created email template, make sure you select it from the "Email Template" selection list. You are all set now.

One last note on email templates is that all email templates can be re-used within an application across processes and human tasks. So with a bit of thinking and good design, you can define email templates that can be generic for re-use.