Deploy the process, following the deployment methods in Chapter 3, Process Deployment and Testing.
Now that you have implemented exception handling for the business and system exception points, it's time to test whether they are working.
ValidateStock
, which calls StockValidator_EBS, StockValidator_EBS
will raise a SOPFault
business exception, if stock is not available.ValidateStock
service task and invokes the StockValidator_EBS
service, if the service throws binding/remote fault, it gets propagated as no boundary catch events are defined. For this component, Fault Policies are defined, and hence the Fault Policy framework will handle the exception. You have defined in fault-policy.xml
that, on infusion of binding or remote fault, you will just terminate the process. Thus, on error, this process will get terminated.Error End Event
and throw BusinessReviewRejectionFault
. BPMN Service Engine interrupts the process and throws the exception to the parent process. The parent process has the event subprocess CatchBusinessFault
defined, which can catch BusinessReviewRejectionFault
, and hence the subprocess CatchBusinessFault
will handle the exception.Catch Timer
event will execute and the process token will follow via the sequence path defined for Timer Catch
event and will reach the CatchSLA
subprocess. This subprocess will save the quote with the SLAVoilated
request status.In this section, you will learn to test business exceptions.
I. Test the SOPFault Business Exception
salesrepresentative
.For instance, let's enter 1030
as PRODUCTID, for which AVAILABILITY is N.
StockValidator_EBS
will raise a SOPFault business exception. Boundary Catch Event will handle the exception, in this case. And the process token reaches Stockvalidation_ExceptionHandler
.II. Handle system exceptions with the Fault Policy framework
StockValidator_EBS
service.salesrepresentative
, and initiate the SalesToContract
process. Enter quote data.ValidateStock
will invoke the StockValidator_EBS
service. As this service is down, it will raise fault, and as no boundary catch event is defined, it gets propagated. For this component, Fault Policies are defined and hence Fault Policy framework will handle the exception.fault-policy.xml
, on infusion of a binding or remote fault, you would just terminate the process. Hence, on an error, this process will get terminated.III. Handle a business exception in a subprocess
salesrepresentative
, and initiate the SalesToContract process. Enter quote data.BusinessAnalyst
and reject the quote.IV. Handle Timeout exception
salesrepresentative
and enter quote data with a PRODUCTID value that is available. In this case it can be 1029
.BusinessAnalyst
and approve the quote.Approver
and Contracts
to perform the Approve Terms and Contracts tasks respectively.Contracts
.Catch Timer
event will execute and the process token will follow the sequence path and reach the CatchSLA
subprocess.CatchSLA
subprocess will save the quote with the SLAVoilated
request status.18.218.93.169