stopProcessing()

A Step function that interrupts the DataMapper to stop processing of the entire data stream.

It behaves the same as the Actions step Stop data mapping.

Note: The nextRecord() and stopProcessing() functions are non-blocking calls. The script that follows these functions will be executed to completion. However, the next step in the DataMapper flow will not be executed.

If this behavior is not desired, JavaScript can use an if-else statement to ignore execution of the unwanted part of the script, as shown in the next example:

if(record.Field1 === 'CA'){
steps.stopProcessing();
} else {
// script to run
}