Enriching Command in Command Dispatch Interceptors

Hi All,

We’re working on a Timesheet application. When an employee submit his timesheet I’m thinking about enriching the command to add information about the department he belongs to and the project he is currently on. This way, I can reduce information user has to provide. I’m thinking of doing this in command handler interceptors by querying service returning the read model.

My question is this the correct place to do it ?

Any advice would be greatly appreciated.

Thanks & Regards,

In my opinion, and considering I’m not a expert, the short answer is “yes”.

The not-so-short answer will be “it depends”. If you need more complex “enrichment” or if you need to pass that info to Events, you may look at the AuditingInterceptor that uses a AuditDataProvider for that “enrichment”.

Hope that helps.


Thank you very much for your advice & information.