Integration with optional services¶
The General Arrangements service can be integrated with other services to consume messages from different bounded contexts and react in concordance.
The integration service will listen to some particular events, of the Suite Ecosystem, notifying the change on an entity relevant for this service. The entities that have an special meaning for general arrangement are the ones that work with Locations. The mentioned messages, have to make sense at business level for general arrangements, if they do, those messages will be converted into AddHighlight or RemoveHighlight messages according to the operation performed in the system. This conversion will be performed at the integration consumers, which we will talk about later on this section.
Place of creation of the project¶
The project is created at the bounded context of the depended service. For example, the integration service should be placed within Service Orders.
How to create it¶
To create the integration project, you must use the microservices template and discard unnecessary files.
The base name of the project should be: "ITsynch.Suite.BoundedContext.GeneralArrangementsIntegration.Application".
An example: if an entity is created, we will want to publish AddHighlight. On the other hand, if that entity reached a final state according to its business logic, we publish RemoveHighlight.
Important
Required usage of constants with the highlight type.
Also, keep in mind that consumers should be as simple as possible and avoid manipulating repositories. Below there is an example of an integration consumer.
Docker-Compose¶
For this integration project you have to add the entry to docker compose, because this is an aspnet service that may or may not be deployed.
Note
We do not need to update docker-host.