
A checking agent makes it possible to check the consistency of a persistent object that is to be stored, prior to the update. It is a class that implements interface IF_OS_CHECK. The interface has a method IS_CONSISTENT with a return value "Result" of type OS_BOOLEAN.
In the simplest case, the interface is implemented in the persistent class itself since all the attributes are known there and can be checked. If an inconsistency is detected, the system tries to repair it or sets the output value to OSCON_FALSE.
You can register the required checking agent for a transaction with method IF_OS_TRANSACTION~REGISTER_CHECK_AGENT. The Transaction Service automatically calls method IS_CONSISTENT prior to updating. An exception is triggered if a checking agent has the return value OSCON_FALSE.