|
|
|
|
|
by redact207
2610 days ago
|
|
I can relate, it didn't make sense to me either in the beginning but eventually the penny dropped after working with it in a past company. Rather than give a half cooked explanation here and risk more confusion, I'll update the readme with some examples and ping you if you're interested. |
|
Say, I have two services deployed individually working in their own domains.
UserService and EmailService
When the task is a simple user signup & welcome email
1. Workflow requests UserService.signupUser
2. UserService.signupUser creates User, then dispatches UserCreated event.
From my understanding, this is where it's different between having Workflow and not having it.
3. Workflow receives UserCreated event, then requests EmailService.sendEmail
IF I did not have Workflow in my design, then EmailService will be listening to UserCreated event from UserService directly.
It sounds almost same as having an orchestration service called UserSignup Service, and do the same thing what Workflow does.
Can you say my understanding correct? Thanks!