OnFault - error handling in Sterling Integrator BPs

Mirjana's picture
Q1) In a BP which has many sequences( some with its own Onfault ...some with no Onfault), if an error occurs in a sequence, which onfault would capture it...one or more than one?
A1) It is always an OnFault connected with a sequence in which error has happened.
Q2) How to instruct the process to go to a specific onFault upon encoutering a specific error.
A2) First topic in below explanation will answer this question
Q3) If an error occurs in a sequence( has its own Onfault) which is contained in another sequence,  is the error handled only by the Onfault of the sequence in which the error occured or is it handled by its own onfault as well as the onfault of the sequence that it is contained in(parent sequence)?
A3) Error is handled through an OnFault connected to a sequence, but if error happens in OnFault part, then that error will be handled by outermost sequence (if exists) and also by a parent process (if exists and if errors are propagated to a parent process). Explained in 4rd and 5th topic below.
Q4) What happens if there is an error in executing the code contained with in a Onfault ?   which Onfault would handle that error?
  • You can have a generic OnFault that will always work because you can simply put just an assign in it, as explained  in 4th topic.
  • OnFault inside of OnFault will not work and give an expected result (6th topic)
  • My opinion is not to force handling all the errors, e.g. if error happens in OnFault part. For example if we send a mail through OnFault, and mail server is down, then this process will finish in Halted state, but SI has a system BP, BPRecovery, that will find such processes in the system and try to Restart/Resume it every 10 minutes (depending on setting in the BP). Sometimes, it is good to have a BP in Halted state, for manual intervention as well, as sometimes problem has to be resolved by our manual intervention. It all depends on the process and expected errors, if they can be automatically resolved just by another restart or need a manual intervention.
Q5) If this BP is called from another BP, will the process exits after completing the execution of code in Onfault or is the control handed over back to the Parent process?
A5) Explained in 5th topic.
There are 6 topics that will explain different scenarios for error handling in Sterling Integrator …