In order to illustrate the handling of faults, a scenario will be used in which a customer record has to be updated with new information. Several possible errors can occur while performing this update, for example if the provided customer data is incomplete or if the customer does not yet have a record.
The following activity diagram is a high-level description of the steps that are executed in the update customer record process:
The Update Customer Record process starts when a request to update a customer
record has been submitted.
If the customer data is incomplete, the process ends immediately with an error message.
After the
customer data has been evaluated, a database connection is opened.
The customer
record is updated, and the database connection is closed.
The process
sends a message to the update requestor that the customer record has been
updated successfully.
A problem
has occurred when the database connection was opened, or when the customer
record was updated.
If the
problem has occurred because the record that had to be updated did not exist, the
record will be created. After that, the control
flow continues normally.
If another problem occurred, the database connection is closed and an error reported to the caller.