Client-side human services: Throwing errors by using error end events

For errors that are thrown from the flow of a client-side human service, you can use error end events to end the processing of a service flow at a specified step.

About this task

To throw a specific error, you can set the properties of the error in the Implementation tab of the error end event, by specifying the error code and mapping the error data to a specified variable.

Procedure

To add an error end event to the client-side human service, complete the following steps:

  1. Open the Process Designer desktop editor.
  2. Open the client-side human service that you want to work with.
  3. In the Diagram view, drag an end event End event tool onto the canvas.
  4. Select the end event and, in the Implementation tab, under Event Type, select Error end event. The end event changes into an error end event Error end event.
  5. In the Implementation tab, under Event Properties, click the Error code picker to select a local variable and specify the error code for the error to be thrown. The error code expression must evaluate to a string value at run time. If the error code is defined as a string literal (for example, "ErrorCode1"), the code is included in the list of defined errors that can be caught when creating an error intermediate event to catch the error in a business process definition (BPD) . Click the Error mapping picker to map the error data to an error mapping variable that was previously defined on the Variables tab.
  6. Optional: To define multiple error end events that can have different error handling logic for different errors, iterate through steps 3 - 5. For each error end event, use different error codes or error data to differentiate between the different kinds of errors.
  7. In the diagram, connect each error end event to the logic you want to run when the error occurs. If you have multiple error end events, connect each one to the error handling logic that applies. The following example shows a client-side human service that uses a coach to display an error message to the user. The coach uses a variable validation script, which is connected to two different error end events with an exclusive gateway.
    Note: The following implementation is provided as an example. You can use a different implementation that meets your business requirements.
    An example of a couple of error end events that are implemented in a client-side human service. The diagram shows a service flow that consists of a start event, a coach, and a script that is connected to two error end events through an exclusive gateway.
  8. Click Save all to save the configuration of the client-side human service.