Saga good fit for external service calls?

69 visualizações
Ir para a primeira mensagem não lida

Lukáš Vasek

não lida,
14/09/2016, 14:39:1814/09/16
para Axon Framework Users
Hi,
I'm implementing some "workflow", where based on event I need to call external service. Is it ok to call services from within sagas or is here better pattern/place where this should be invoked (special type of event handler?).
What if I need to pass request parameters to this event handlers and don't want to store them in event metadata (mainly spring Oauth authentication)?

Thanks

jorgheymans

não lida,
16/09/2016, 01:49:0916/09/16
para Axon Framework Users
Are you calling the services to get data from or are you calling them to invoke consequence logic of your use case ? The former i guess would be ok, the latter seems more like an eventhandler thing. 

Jorg

Lukáš Vasek

não lida,
16/09/2016, 03:21:5716/09/16
para Axon Framework Users
Hi Jorg,
I'm calling external service to get data needed to construct commands and then dispatch this commands through command gateway. 

Allard Buijze

não lida,
24/09/2016, 01:34:3524/09/16
para Axon Framework Users
Hi,

it's generally ok to call external services from Sagas. You can consider that as sending a command or performing a query. Perfectly fine things of a saga (or event handler) to do.

Cheers,

Allard
On vr 16 sep. 2016 at 02:21, Lukáš Vasek <bil...@gmail.com> wrote:
Hi Jorg,
I'm calling external service to get data needed to construct commands and then dispatch this commands through command gateway. 

--
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.
Responder a todos
Responder ao autor
Reencaminhar
0 mensagens novas