Business Process and Data Transformation Language Reference
Provide zero or more <catch> and one <catchall> element to catch faults and system errors.
<scope> <throw fault='"MyFault"'/> ... <faulthandlers> <catch fault='"MyFault"'> ... </catch> <catch fault='"OtherFault"'> ... </catch> <catchall> ... </catchall> </faulthandlers> </scope>
To enable error handling, BPL defines an element called <scope>. A scope is a wrapper for a set of activities. This scope may contain one or more activities, one or more fault handlers, and zero or more compensation handlers. The <faulthandlers> element is intended to catch any errors that activities within the <scope> produce. The <catch> and <catchall> elements within <faulthandlers> may provide <compensate> statements that invoke <compensationhandler> elements to compensate for those errors.
When a <scope> provides no <faulthandlers> block, Ensemble automatically outputs the system error to the Event Log
. When a <scope> does
contain a <faulthandlers> block, the BPL business process must output <trace> messages to the Event Log for system error messages to appear there. System error messages appear on the Terminal console, in either case.
It is not possible to reverse the order of <compensationhandlers>
and <faulthandlers>. If both blocks are provided, <compensationhandlers> must appear first and <faulthandlers> second.
© 1997-2019 InterSystems Corporation, Cambridge, MA