Violations
Violations are either postponable or non-postponable.
Postponable and non-postponable violations
If a violation is postponable, approval is not needed immediately in order to allow a transaction to proceed. Instead, a hold is put on the order that allows changes to proceed until the condition is removed. Approvals can take place at the end of the order. In a maximum number of coupons example, the line that results in a violation can be added when a coupon is presented that exceeds the configured maximum. However, the approver must override the violation or violations at the end of the order to allow the transaction.
Reporting violations and approvals
An error code is thrown for rule violations that cannot be postponed. Those violations are logged unless resolved at the validation level.
If a violation is not postponable, an exception is thrown and displayed in the console, and the order is stopped until the violation is resolved.
If there is a violation for an item and the item is removed, the violation is removed.