Monday, February 24, 2014

ADF Form as Email Notification From Human Task

This blog will show how to use an ADF form to send email notification from Human Task, when some action is taken on a task by the user or the task is assigned to a user.

As a prerequisite email configuration has to be done on the server using Enterprise Manager and ADF form needs to be attached to your Human Task.

Once email configuration is done, we have to set up the notification in Human Tasks and modify ADF form so that we can send it as Email.

Below are the steps for sending ADF Form as email notification in From Human Task:
1.     Open a .task file (e.g AccountDistributionHumanTask.task) for which email notification needs to be set.

2.     Click on notification and go to Advanced Tab as shown below:

3.     You can select from two options as shown below:
We selected send individual mails in our case.

4.     Now go to General Tab and click on add icon to add Task Status and Recipient as to when and to whom you want to send the email notification:



5.     If you want to add a custom message i.e notification header, on the General Tab click on pencil icon under Notification Header column as shown in the screenshot below:


6.     Write your message in Edit Notification Message window as shown below and click OK.

Above settings will pick up the corresponding email id of the user either from mail attribute of embedded LDAP or from the task payload(depends on the requirement and implementation). In our case we are sending a link to Worklist Application, details of which is being picked up from payload for different environment.



7.     Now open the .jspx file in your ADF project and add a af:switcher inside af:form and move the default facet(e.g f:facet-Worklist) inside the af:switcher. In the same af:switcher add another f:facet(e.g f:facet-Email) for creating email content to be sent in the Email, below screen shot shows the structure of components:






For creating email content you can use datacontrol and drag and drop attributes as af:outputText to Email Facet(e.g select invoiceNumber and drag and drop on to Email Facet) as shown below:







8.      Add the following condition to FacetName property of the af:switcher to let it decide which facet to display:
#{pageFlowScope.bpmClientType eq 'notificationClient' ? 'Email' : 'Worklist'} as shown in below screenshot:

Now when you run your application, above condition will decide whether bpmClientType is notificationClient or not. If it is, then it will execute the Email facet and the response will be based on whatever you put under the Email facet. When the ADF form is accessed though a worklist, it will execute the “Worklist” facet and display the complete form for user entry.

On the other hand if you are not using ADF form, then the content of email will go into Notification Header as shown earlier or you will have to use email component of BPEL, where a lot of work has to be done in formatting because both will use html tags to create the content.

So, using the same ADF form, that you associate to a human task, you can generate the email notification.


Much thanks to Siddhartha Agarwal for today's post!




9 comments:

  1. While we have been burdened with expectations of a successful successor to the LG G6, we have been saying for some time that this new phone will be the one phone which will rule them all.
    LG has already been on a roll and we expect that the G7 will also be up to the mark. Want to know more about it? Check out this website LG G7 Smartphone

    ReplyDelete
  2. If you are in Jaipur and need beautiful Call Girls in Jaipur or white skin Call Girls in Jaipur then you can simply book call girls in Jaipur from one of the best escort agency named Call Girls in Jaipur. It is No.1 premier escort agency and provide both incall or outcall facility to clients.Please click on the following link to check the official websites Call Girls in Jaipur

    ReplyDelete
  3. Great post! I didn’t knowral of these resources and I’m going to go check them out now!

    ReplyDelete
    Replies
    1. Yes! the great post it is. I love to read this because I am searching these kinds of blogs and finally I got professional assignment writing uk this. I want to appreciate your work as you add screenshots on this post which helps me a lot to learn more quickly.

      Delete
  4. We porvide you quality item which you buy on a single click in Auckland New Zealand. Treasurebox nz is one of the most rising store which provide their customers all the items at low rates.

    ReplyDelete
  5. In the world of technologies and computer science, every new day brings a new and modern kind of competitions and the fact is this, the problems is totally different from before have been faced. In the technologies world every professional and expert have to get ready for the new updations and new challenges.

    ReplyDelete
  6. If you need to write a movie review but it is for the first time, you shoud check out the sample movie reviews and for sure that this essay sample will help you to write your essay.

    ReplyDelete
  7. How to get rid of termites
    A termite infestation in your home can be a stressful experience. Are you concerned your house may be experiencing a termite infestation? The best way to get rid of termites is always to contact a pest control professional like Ehrlich.

    Below are just a few of the reasons why it is best to hire a termite control professional:

    Do-it-yourself termite treatments are mostly ineffective and will not prevent termites from re-infesting your property.
    Termites are highly secretive creatures that are difficult to identify without specialized training.
    A properly trained pest control professional will ensure that the termite treatments are applied in the safest manner possible.
    The method of treatment an Ehrlich technician will employ to rid a property of termites will depend on the species of termite.
    شركة مكافحة حشرات بحائل
    شركة مكافحة حشرات ببريدة
    شرة رش مبيدات بخميس مشيط
    شركة مكافحة النمل الابيض بالقصيم

    ReplyDelete