Architecture
This section describes the architecture of Litium connect.
Deployment model
Applications developed to integrate Litium to other external systems have their own life cycle. This means they are independent applications from Litium. These applications communicates with Litium using the API contracts defined in the Litium Connect business domain web APIs.
For example, Litium Connect ERP domain specifies the contracts that are defined in Litium.Connect.Abstractions package that would be deployed together with Litium.
Litium Connect Erp integration application will have its own runtime life cycle and need be a separate application.
The following image shows how the deployment model for a connector integration application towards Microsoft Dynamics Nav ERP would look like.

Component model
- The contracts common to all Litium connect business domains are defined in Litium.Connect.Abstractions package.
- Litium contracts are defined in the Litium.Abstractions package.

Litium connect integration applications should talk to Litium through web APIs. These WebAPI are using the Litium.Connect.Abstractions domain model for the data that is being served through them.
The integration applications are dependent on the WebAPI specification, and not in the Litium application. It is also not dependent on the Litium domain model defined in Litium.Abstractions package.
Application discovery and registration
The Litium server instance knows about the Litium apps by a registration process as explained below.
The integration applications should register themselves with the intended Litium instance. While registering, they should make it known to Litium, which functionality it is providing, by way of registering to listen to pre-defined webhook events.
Registration is using the Litium Webhook framework.
For example, one such event, in the ERP domain is OrderConfirmed event. See API documentation for complete list.
Following is an abstract example to explain how an integration application interacts with Litium. The method names and entities are only for illustration purposes.
In the following sequence diagram, "Dynamics365 App", the integration application registers to listen on the OrderConfirmed event. When an order is confirmed the Litium Connect ERP notify the application of it. The application then decides to respond to the event by exporting the order to Dynamics 365 ERP.
