Complete Flow - Master Detail with Human Task Flow.
For Order Header
- Create Order
- Validate Customer Creait Rating , If Rating > 750 then Auto Approve and Progress the Order Header , if <750 then Manual Approval Required.
- Validate the Price List at Order Header.
- Call Order line Process to create Order lines.
- Create Order Lines
- Once OrderHeader Created
- Validate the Items/Stock and Price List.
- If Order Line Total > 750 then Manual Approval Required.
- For Approval a Notification will send to user.
- User Can Approve the Notification for his worklist .
- 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.
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
- Credit Rating
- Bill/Ship Address etc
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/rejection.to 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
This is really very good , thanks for sharing your knowledge with us.
ReplyDelete