Sunday, August 3, 2014

Approve/Reject Via Email in IBM BPM


This kind email notification is very use full in case approval notification to a stake holder in a process. Let see how to build it. (I am just giving an idea but not providing entire code for this)
Following components can be used.
  1. Teamworks Email service to send mail
  2. Intermediate message event
  3. UCA (onEvent)
  4. Invoke UCA
  5. External activity (or a Human service)
  6. Servlet to trigger IBM BPM Service which will in turn triggers UCA (from point 3)
Click to accept approach



Approach :

In the BPD an intermediate message event should be attached to the human activity. An email notification will be sent to user with Accept/Reject buttons from the BPD instance before a task is created for a particular user. On click of Accept/Reject, a servlet will be invoked with neccessary inputs like instance id, approval status and unique key to trigger UCA etc. This servlet in turn invokea an IBM BPM service which will invoke the UCA, which should trigger the intermediate message event and it should close the user’s task in the instance. Based output from UCA (Status: approved/ Rejected), the flow should proceed to the next activity.
 Below are the steps to create and use this mail
  1. Create a BPD with a notification service (system service) and human activity or external Activity . Attach an Intermediate Event to the External Activity or UCA with a UCA (onEvent ) linked to it.                    
  2. Notification service : This service should send the notification to the stake holders and also generate a unique key which should be sent in the email along with the servlet link, which acts as correlation parameter to the Intermediate message event. 
  3. Servlet : A servlet should be created and hosted on an application server. This Servlet will be invoked up on click of Accept or Reject by passing necessary parameters to invoke the ibm bpm service and parameters to trigger intermediate message event attachment the user task.
  4. IBM BPM Service :  This service will be triggered from the above servlet, which should be able to trigger the intermediate message event attached to the User activity, which will close the user task with out user having to login to ibm bpm portal to close the task.
Hope the post is Help full !!!



2 comments:

  1. Hi,
    I am new to IBM BPM and I have same requirement, where approval required to complete the process.

    Could you please send me the step by step guide or toolkit.

    Thanks in Advance

    ReplyDelete
  2. Hi Arif,
    I don't have step by step guide or Toolkit, readily available with me. I have done this long ago. The approach provided in this article is all that I have.

    ReplyDelete