Note: The information below is current as of IBM BPM version 8.5.7 CF2017.03.
Outcomes of Unhandled Errors
Ask the administrator to check the SystemOut.log file for more information to resolve the error. (<Reference String>)"
Successful error handling is not only important for a good user experience but it also facilitates the ability of support members to help customers and can cut down on the time it takes for development to address issues.
In HHS diagrams, a Server script node can be wired with an Error Intermediate Event:
IBM's current policy (as of May 2017, IBM BPM version 8.5.7 CF2017.03) is that the error event framework used in CSHS are "targeted to 'business' errors that are modeled in the CSHS or a service." Improvements are scheduled to officially clarify this behavior in IBM's documentation.
As a try/catch/finally script node will complete successfully from the perspective of BPM, the management of the error largely becomes a decision for how to wire the Client-side script node in the diagram. The exception to this is syntax errors which won't be managed by a try block, but these should mostly be found and resolved during development.
- Wire the node as normal. With proper logging of errors in the catch block of the script, data around the error can be sent to the console log. The downside is that the error ends up nearly invisible to the end user; now instead of the task coming to a complete halt the user may be presented with inconsistent data or task behavior with no understanding of what has gone wrong (nor indication that they should be seeking out help). Simply hiding problems is often not a good choice!
- Use decision gateways to route error pathways. The decision gateway can evaluate a variable set in the catch block of the Client-side script node. This setup mimics the Error boundary events useable in a HHS.
With that in mind, we suggest keeping in mind two concepts:
- Manage errors with a thought towards end users. End users are the ones most likely to encounter bugs in production and yet are typically the least equipped to manage them. Empower your users to help both you and themselves by presenting them with helpful messaging and recovery pathways.