KB Article #157406

Using a map for error handling in a flow deployed in production

Problem

While running a flow as a simulation, an option allows the use of a map to add some error handling (see the "Creating a Map for error handling" section of the Mapping Services 2.4.0 User Guide).
This option is not available outside of the simulation context, it is not available for a flow deployed in production.

Resolution


To use a map to add some error handling in a flow, an event trigger and a specific map has to be added to this flow:
- create a new DML map, with no input file, and as output file use a basic bdoc specifically created for this use (flat file, one leaf - leaf size should be increased)
- edit the map ; in the output file, set the leaf expression with the DML function "getLastTraceMessage()"
- edit the flow in which error handling is needed
- add an event object ; in its attributes, set the "Level" to ERROR
- add a DML block ; include the map just created in this block ; link the event and the block

Each time a mapping error will be encountered, the event will be triggered and the error message will be added in the output file.