In this post I will give a small POC (Proof of concept) about how to design an Oracle BPEL flow with Business Rule and Human Task .I will cover (if-then-else) business rule in this post .For Decision Table business rule please keep watching my coming posts.
Business Rule help us to make the if-then-else condition , though we can perform this with many different ways ,but advantage of business rules is we can take it outside of the application logic in a declarative manner.
More Over BPEL is not only the process that can use Business Rules , It can be used by other service consumers as well.It take Infacts as input and return outfacts,When you design your rule, you take your input fact and compare it against other values until you have your result. The result is assigned to the output fact and returned by the decision service.
I will not cover Human Task in this demo, for Human Task please refer my earlier Posting -
Human Task in BPEL
In my demo outfacts of business rule will decide if a Manual Approval is required for customer or Not.
In my example , BPEL Process take customerID as input and then call customer web services to get the complete details(Name, Credit Rating etc) of the customer.It then pass the Credit Rating to Business Rule component , business rule components then decide if Credit Rating is < 600 then Manual Approval is required else Auto Approve it.
Design BPEL Flow
Add Business Rule in Composite
Define the InPut and OutPut for for Buiness Rule
Add Webservice in BPEL flow to get the customer deatils ( no shown in Screen shots).
Add Business Rule in BPEL flow.
Define Ruleset for Business Rule ( Select the Business Rule Components in BPEL flow and select edit)
Define Human Task Flow for approval
Build and Deploy Process.
Run ( It has one parameter , Customer ID)
Approve or Reject the Notification.
That's all for Demo/POC.
Hope that Helps.
Post a Comment