Enriching Command in Command Dispatch Interceptors

38 views
Skip to first unread message

Setya

unread,
Nov 6, 2015, 3:36:03 AM11/6/15
to Axon Framework Users
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,
Setya

António Mota

unread,
Nov 9, 2015, 12:31:49 PM11/9/15
to Axon Framework Users
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.

Setts

unread,
Nov 10, 2015, 8:45:24 AM11/10/15
to axonfr...@googlegroups.com, Axon Framework Users
Hi,

Thank you very much for your advice & information.

Cheers,
Setya
--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages