You learnt how to define fault policies for a BPMN process in Chapter 8, Exception Management, in the Handling a system exception Fault Management Framework section.
In Chapter 8, Exception Management, BPMN Service Engine runs the task ValidateStock
, which calls StockValidator_EBS. StockValidator_EBS
will raise an error if stock is not available. The task fails with a SOAP error, which will be converted by BPMN Service Engine into an exception. Here, you will use the framework to define a fault policy that enables human intervention on a BPMN process and you will also perform recovery on BPMN process components.
You will implement a service task in your BPM process to invoke this StockValidator_EBS
service.
If Stock = Available Then Process Token follows the Normal path
else if Stock != Available then service task throws a Error
fault-policy.xml
file and add the following code:<faultName xmlns:client="http://xmlns.oracle.com/Implementation/StockCheckingService/StockValidator" name="client:SOPFault"> <condition> <test>$fault.payload = "UnAvailable"</test> <action ref = "ora-human-intervention"/> </condition> </faultName>
If availability is 'N', then StockValidator_EBS
will raise a SOPFault
and will be handled by the policy framework.
fault-policy.xml
, you have defined human intervention action. Without fault policies, BPMN instances do not generate recoverable faults (instead they are non recoverable); the ora-human-intervention action makes the fault recoverable.StockValidator_EBS
will have availability as 'N' and this service will result in SOPFault
, which you will handle using the fault policy framework.You can find that a fault instance is created.
You should see that the page will get refreshed and indicates that no faults occurred.
You created a StockValidator_EBS
BPEL web service ,based on a PLSQL procedure, which checks for item availability in MTL_SYSTEM_ITEMS
table and returns SO0050Fault
if item not available.
When this fault is raised, policy framework will handle this fault, in this case. And you can perform the fault recovery from Oracle EM console.
18.188.218.226