Skip to content

Output Generators

Gal Koren edited this page Nov 12, 2020 · 1 revision

This is the 3rd type of components you can add to the flow, the OutputGenerator.
Its signature looks pretty much like the ChangesValidator and the Enricher we seen before, so I won't bother giving a lengthy example this time.
The output generators are invoked at the end of the flow after the validators and they only operate on valid commands.
They run inside a transaction.

When the flow is built, it already contains a single DbCommandsOutputGenerator. This is the guy who performs the actual SQL queries to persist the entities.

At Kenshoo, we usually add a ChangeLogOutputGenerator to our flow which gives us an audit log (this class is not provided in the library because it is specific to Kenshoo).