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:
- Open the Process Designer desktop editor.
- Open the client-side human service that you want to work
with.
- In the Diagram view, drag an end event onto
the canvas.
- 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 .
- 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.
- 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.
- 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.
- Click Save all to save the configuration
of the client-side human service.