Search 800 + Posts

Jul 22, 2011

Master Detail BPEL flow with Human Task Activity

In this post I will show a small demo ( Screen Shots) about Master Detail BPEL Flow with Human task flow activity .For this demo , I have created a Master Detail flow , Order Header (Master) and Order Lines (Detail).Below are the details about validation and data flow for the complete Process -
Complete Flow  - Master Detail with Human Task Flow.

For Order Header
  1. Create Order
  2. Validate Customer Creait Rating , If  Rating > 750 then Auto Approve and Progress the Order Header , if <750 then Manual Approval Required.
  3. Validate the Price List at Order Header.
  4. Call Order line Process to create Order lines.
For Order Lines
  1. Create Order Lines 
  2. Once OrderHeader Created
  3. Validate the Items/Stock  and Price List.
  4. If Order Line Total > 750 then Manual Approval Required.
Manual Approval
  1. For Approval a Notification will send to user.
  2. User Can Approve the Notification for his worklist .
  3. For work-list notification we have 2 options , we can design a simple notification or Notification with UI ( ADF Page).In this demo I have shown the simple worklist notification as well worklist notification with UI design with Oracle ADF.
 For this POC we use default user – weblogic.

Order Header With Approval Task flow. - 
In Order Header BPEL Process,we will received the input payload and validate the customer info (by  calling a Partner link).Partner link take customer ID as input and return info like
  1. Credit Rating
  2. Bill/Ship Address etc
If Credit Rating  < 750 ,as shown below order header process call the Manual workflow  task activity.
If User rejected the order or not respond in 1 days system automatically terminate the process as shown below.
 On Approval , BPEL process will create order header record and immediately execute "Signal" activity to call the Order Line flow.
After calling the Line flow , Order header flow progress further and wait for response from line at "Receive Signal "Activity .
 Order Line flow - it receive "Signal" from Order Header Flow and then validate Item/Stock/Price and if line total > 750 then call the Manual approval Activity to Approve the line.
Order Line flow with Human task flow (Called if line total > 750)

Once Line is done , Line flow send signal to Order Header flow and both the flows then completed.

Human task flow Design
Define General Properties 

 Define Parameters
Run Time Status 
Enter Parameters to execute the BPEL Process.
Since Customer 3 has  Credit Rating  is > 750 , order header will Auto approved ( Manual Approval not required here )and call the line flow, but BPEL process for Order line and header is not completes as Line Total is > 750 thus Manual approval required here .

Since line is not yet approved , if we navigate to BPEL tree , we can see  Header and Line process are still in Running Status.
Since Manual Approval is required for line total , as soon as manual approval step got executed , it send Notification to user for Approval/ view Notification we need to login to worklist for user- Weblogic

Login to Worklist
One Request is waiting for User Approval - (In this example I have not desigend any UI(ADF Page) for Notification.)

Once approver approve the Request , both Order Lines and Header flow are now CLOSED.

In case you want to design an UI to provide additional info to Approver (in notification) before he approve/Reject the request,  we can design the Workflist UI in ADF ( Infact we have option to do Auto Generate) as shown below

1 comment:

  1. This is really very good , thanks for sharing your knowledge with us.