Manual Notification in Order Management using BPEL
POC – How to create Requirement Sales Order Creation.
Setting up Order Header
- Create an Order in Order Management
- Validate Customer Create Rating, if the rating is greater than 750 then Auto approve and Progress the Order Header, if the rating is less 750 then approve it Manually.
- Validate the Price List at the Order Header.
- Call the Order line Process to create Order lines.
Setting up Order Lines
- Create the Order Lines once the Order Header is created
- Validate the Items and Stock
- Validate Price List
- If the Order Line Total is greater than 750 then go for Manual Approval.
Setting up Manual Approval
- For Manual approval a notification will be sent to the user.
- User can approve the notification of his work list. One can design a simple notification or notification with UI (ADF Page). Both the notifications are mentioned in the following demo
- For this proof of concept we are using default user called weblogic
Here’s the complete BPEL flow.
Abstract Order Header flow with Manual Approval – Once we get the data from Partner link/web service (to validate the customer and return rating etc), we can check the credit rating and then based on the requirement we call auto approval or manual approval. On Non approval the process is terminated.
At the end of Order Header process, Create the Order Header and then call the Order line flow.
In the Order line flow validate Items/Stock and Price. If the line total is > 750 then call the Manual flow to approve the order line, else auto approve the order line.
Human Task flow Design defines the Human task flow –
Define the General Attributes like Title Outcome Priority etc
Design the Input Parameter for the Notification (you can make it Read-only or Read–Write).
Design the flow.
Run the BPEL Process Input Parameters -
BPEL Process flow – Since Header approval is not Required, Header Process progresses till it reaches the activity to call the Order lines (in BPEL we call it Signal activity).
Header Process then calls the Order line BPEL flow and progresses further till it reaches the wait for line activity (In BPEL we call Receive Signal). Once Header flow reaches Receive Signal activity (It has configured to wait for line flow) it waits for Signal from the line. On receiving the Signal from the line it progresses further. Similarly, Line activity waits for the Order Header to progress. At the end of the line, the flow will send signal to the header to progress further.
Shown below is the line process awaiting Manual approval.
Once we manually approve order Line, BPEL will progress the order line flow till the end .Once line flow completes, the Order Header flow also gets completed.
For Notification, Oracle has provided worklist, where user can login and check their notifications.
Example #1 is of Simple Notification.
Example #2 is for the Notification with UI (ADF Page) and 3 Parameters. We can print any info that involves in the flow based on requirement. In this case are printing the Quantity, Price and Line total.