Business exceptions allow you to create cleaner processes and allow you to define exceptional situations separately from the happy path of the process.
Business Exceptions must be defined as BPM Objects within the Catalog. They behave like other BPM Objects and can contain methods, attributes, and presentations. They can be used anywhere within a process.
Business exceptions are expected business situations. Unlike System exceptions, Business exceptions do not cause the running transaction to fail.
If your code throws a Business exception during the execution of a process Activity (and it is not handled within PBL code) it causes the execution of the Activity to exit but the transaction is finished successfully. The Process Execution Engine commits the transaction and any changes made to process instance variables are persisted as usual.
If the execution of a process activity finishes due to a Business exception, the Process Execution Engine does not retry the execution of the activity because the execution did not fail.
In general, business exceptions are not resolved by retrying. For example, you may raise a business exception if the credit score for a credit card application is low. Trying the credit check again does not make the score higher.
If a Business exception is raised during the execution of an interactive activity, the interaction window is closed and the work item is no longer on the user work list. The process instance is moved to the exception handling flow.
if creditScore > 700 then
lowScoreEx as LowScoreException = LowScoreException()
lowScoreEx.value = creditScore
throw lowScoreEx
end