Sagas are designed for long running processes, but they can also be used for orchestrating services. Here is what now happens:
- When the user completes the form to register a deal in the Sales system, this sends a RegisterDeal command to the Sales message handlers containing the information about the Deal.
- This also sends an InitializeClient command to Client Services, which contains information about the Agreement (This command is possibly named incorrectly).
- When the RegisterDeal command is handled in Sales, it raises a LeadSignedUp event, containing all information about the lead.
- Bot the InitializeClient command and LeadSignedUp event are handled by the InitializeClient saga. Once the saga has received both of these messages, it has all the information to properly initialize the client.
Now I have been able to remove the service references to Sales from the CLient Services UI.
No comments:
Post a Comment