Make things go wrong… your way

To handle exceptional conditions, you might use conditional statements in each place that the events might occur. However, for very large and complex expressions, this would make your text inefficient and hard to read. To represent exceptional conditions, DML uses the concept of exceptions.

Basically an exception is an alarm that is set off when something unusual happens. You still need to use a conditional statement to detect the event, but when the condition is met, the integration engine raises the alarm, aborts the processing of the input data and either discards or rejects the data it had just started to compute.

Setting off the alarm is known as raising an exception and is done by invoking the special instruction exit with a single argument that states which behavior the integration engine must adopt to handle the alarm:

Exit argument Behavior adopted by the engine

reject

When receiving this exception, the server aborts the current processing and directly goes on the next one.

rejectMessage

The integration engine server rejects the message currently processed, then either waits or processes the next incoming message

Here is an example of an expression that rejects a message on a certain condition:


if CheckIBAN(this\\IBAN_Code) then
{
    exit rejectMessage
}

Whenever an exit is encountered and executed, the server aborts what it was currently doing. Usually, this leads to the cancellation of several parts of the current data processing. Exception handling relies on a complete transactional engine that is able to validate or cancel data generation operations according to the situation.

Related Links