Use error event handlers to catch errors at any point in
a client-side human service and to implement error handling logic
for these errors. To catch a specific error, you can set the properties
of the error in the Implementation tab of the
error event handler by specifying the error code and mapping the error
data to a specified variable.
Procedure
To add an error event handler to the client-side human
service, complete the following steps:
- Open the Process Designer desktop editor.
- Open the client-side human service that you want to work
with.
- In the Diagram view, drag an event
handler onto the canvas. By default,
an event trigger of error event is assigned and the handler changes
to an Error event handler.
- By default, the error event is set to catch all errors.
To catch a specific error, complete the following steps:
- In the Implementation tab, under Behavior,
select Catch specific errors.
- Click Error code picker to select
a local variable that specifies the error code for the error to be
caught.
- Click the Error mapping picker
to map the error data to an error mapping variable that was previously
defined on the Variables tab.
- Double-click the error event handler, and then implement
your error handling logic.
- You can declare additional private variables in the error
event handler that are visible only to the event handler.
- You can use a coach to display the error to the user.
Important: If you use a coach in the error event handler, you
must provide a path that exits the flow with either an end event or
an error end event. If you use a stay-on-page event after a coach
in an error event handler, you will be returned to the coach you just
exited. If there is no other path out of the coach, an infinite loop
occurs.
- Optional: To define multiple error event handlers
that can have different error handling logic for different errors,
iterate through steps 3 - 5. For each error event handler, use different
error codes or error data to differentiate between the different kinds
of errors.
- Click Save all to save the configuration
of the client-side human service.