SOA Suite 12c: Actionable Emails with Human Task service image33

SOA Suite 12c: Actionable Emails with Human Task service

It is my assumption that inbound and outbound emailing has been configured – for example for a GMail account – as described in these two articles: GMail for inbound mail in SOA Suite 12c and GMail for outbound mail in SOA Suite 12c and that test mails can be sent and received.

The steps are:

  • configure an email driver for SOA Suite for outbound and inbound emails
  • configure an email address (one of the inbound email accounts set up on the email driver configuration) for actionable emails
  • create a Human Task definition for a task that is configured as actionable; assign this task to a user who has an email configured in the LDAP directory
  • deploy the Human Task as part of a SOA Composite; invoke the composite to have the task assigned to the user
  • the user should receive a notification mail message regarding the task assignment with the option to act on the task by clicking a link in the email; clicking such a link will trigger a response email to the actionable email account with appropriate meta-data for the SOA Suite to interpret the response; the user can even add attachments and comments to this task response mail.

We assume the first setp has been taken care of. Once the email driver for the managed server running SOA Suite has been configured for outbound and inbound email interaction, there is really not a lot to do.

Open the menu SOA Administration | Workflow Properties:

image

 

Ensure that the actionable email address is set:

image

This setting has to consequences (I believe): one is to configure the links for each of the task outcomes that will be included in the actionable emails sent to the users who have been assigned the task and the second one is to correctly poll this inbound email account for incoming emails that are in fact actions on a task.

Unfortunately, after making a change on this page, the managed server has to be restarted.

Configure a user with an email address in our LDAP

Once restarted, let’s make sure that we have at least one user in the embedded LDAP directory in our WebLogic domain with an email address configured.

Open the WebLogic Server Admin Console.  Click on Security Realms in the Domain Structure navigator. Click on the realm myrealm. Click on the tab Users and Groups:

image

Click on user weblogic.

Click on the tab Attributes

Locate atribute mail. Click on the value, define a valid email address and press enter.

image

When weblogic next would login to the BPM Worklist application, he would find a default notification channel configured based upon this email address:

image

Create a Human Task definition that is actionable (and assigned to a user with an email address configured)

We will not discuss all details around creating a SOA composite application, a HumanTask and a BPEL process from which to invoke the Human Task. These can be found in various other resources.

However, make sure that:

  • the task is assigned to user weblogic (or a group that weblogic is part of; or some other user with a configured email address)
  • the task is configured as actionable – and notifications are sent upon task assignment (the default setting)

The SOA Composite looks like this:

image

The task is assigned to user weblogic:

SNAGHTML8f0521

And it is actionable:

image

Additionally, notifications are sent for task assignment:

image

 

Deploy and Run

When the SOA composite is deployed and a test call is made, a new instance is created:

image

This instance is still running, waiting as it is for the task to be completed:

image

The task instance to act upon is visible to weblogic in the BPM Worklist application:

image

And if he fails to check over there, the Human Task has still reached out to him, via the actionable email:

image

The email does not contain a lot of useful details. It does have links for the two supported outcomes.

image

When we click the Approve link, the reply email is prepared:

image

it also allows weblogic to enter a comment. When we press Send, the mail is sent to the actionable email address that was configured for the Human Task engine.

image

When we check on the instance in the EM FMW Control – after we allow for the polling interval to pass:

image

The BPEL process audit trace provides insight in what happened in some more detail.

image

It is clear that mail was received and processed.

From the EM FMW Control’s overview page for the Human Workflow Engine that is opened using the SOA Infrastructure context menu Service Engines | Human Workflow

image

We can see an overview from all recent outbound and inbound email messages. Here we find the actionable email response that was received and we can inspect its contents:

image

Of course these emails can also be received on a mobile device – and the action can be taken on that device as well. While I as walking through our local DIY store, I received this mail on my iPhone:

image

After some time, I decided to act, by clicking the link to Approve:

image

I did not enter any comments or add any attachments. I merely pressed Send.

It turned out I had waited for too long and the task had already expired – or been handled by someone else; I received the following email from the Human Task service:

image

7 Comments

  1. misterbaanu October 5, 2017
  2. manideepthi August 2, 2017
  3. Omkar July 11, 2017
  4. Devlin Blade May 18, 2017
  5. Devlin Blade May 2, 2017
  6. Venkat December 27, 2015