Wednesday, March 4, 2015

Oracle BPM - Error Handling in BPM 11G/12C - Part 1

Error handling is very critical part of bpm process development. Error handling defines how process going to react in case of  unexpected behavior like  service is not reachable, problem with the hard disk, credit card authentication problems etc.

Oracle BPM11g/12C has rich support for raising and responding to events. The BPMN Error Event is
used for catching and throwing exceptions. The exceptions could be system exceptions or
Business exceptions.

System Exception :

  • Failure in the database connection
  • Connectivity loss
  • Problem with the hard disk
Business Exception :

  • Lack of stock
  • Workload limit exceeded
  • Expense limit exceeded


In this article we will cover how to handle  Business Exception. In the following articles we will cover System Exception Handling  and Error Handling  Framework for BPM processes.

Note : I am using BPM 12C for this demo.

1.  Handle Business Exception :

In this scenario we will create two bpm processes CreateOrder and OrderReview. CreateOrder process will  invoke OrderReview process. OrderReview  process validates customer order and  will throw a Business exception  if order is not valid. If CreateOrder receive any exception from OrderReview process then it reject the order otherwise accept the Order.

1. Create BPM project by name ValidateOrderBusinessException with empty composite.



2.  Create simple OrderType business object.

 

3. Create OrderNotValid business exception







4.  Create OrderReview bpm process





Process Input mapping


Process output mapping





5. Create CreateOrder BPM process


  Input mapping

 Service Mapping

Error boundary event mapping



6. Execute process

1) Without exception
Request Message:




Audit Trail




2) With exception















This was very simple way to handle business exceptions in BPM processes. There is also other ways to handle business exception like we can add human task in order rejected path and correct the order and again send order for validation.
Example 1


Example 2



Example 3



 In above cases  we can return back to main flow and continue. If we don't want  to return to main flow in case of business error then we can use Event Subprocess.

Example 4.




In second part of this arcticle, we will see how to handle exceptions using Fault Management Framework in BPM processes.

No comments:

Post a Comment