1. Few words about OnFault

OnFault is very important to be included in the BP. In the case of error in a business process, without proper OnFault handling, process can finish in Halted, Interrupted or another state. Processes in such states will never be archived from the system, that can cause performance issues.
If the error happens in the BP, but OnFault handles it properly, then we will find red light in the BP monitor that indicates error, but state of the process will be Completed, and such process will be archived.
There are 2 main reasons for OnFault handling:
- one is notification about error or any kind of handling that is supposed to be done in the case of error
- another reason is to finish the BP with Completed state so it can be archived and removed from a database properly. Only records that belong to business process that finished with Completed or Terminated statuses will be Indexed/archived/purged from a database. If OnFault is not used, and error happens in a BP, status will be Halted and never removed from a database.
OnFault is connected to a sequence (Sequence Start element), and in the case of any error on that sequence (between Sequence Start and Sequence End), process will be redirected into OnFault part, and ANY OTHER SERVICE/STEP from that sequence will NOT run after error has thrown. Sequence simply stops in the service that threw an error and continue with OnFault connected exactly to that sequence.

