Use Development tips page for useful informations to use during customization phase.
The IntegrationAPI project is responsible for orchestrating the various private APIs exposed by FSM: specifically, based on required use cases, integration APIs are exposed, which take care of calling the correct private APIs.
IntegrationAPI logic flow
-
The external system calls an API exposed by IntegrationAPI
-
IntegrationAPI works as an orchestrator of the request and directs it, broken down into N specific requests, to the private API(s) that are associated with the specific use case
-
A response is then returned to the external system with the outcome of the entire processing
To allow IntegrationAPI project to respond the needs of anyone who uses the exposed APIs, the possibility of customizing them is also clearly foreseen, so default implementations become applicable to different contexts and use cases.
To talk about customizations you need to have a clear understanding of the end-to-end flow of a request coming from an external system.
Request’s internal flow
-
All APIs are exposed in classes annotated with @RestController and named *Controller (for example search in code the class named AssetsController)
-
All Controllers demand the execution of the elaboration to an intermediate layer, an interface named *Service implemented by a class annotated with @Service
-
Service classes expose the business methods associated with the particular use case: a concrete example is AccountServiceImpl, which implements the AccountService interface, that exposes methods that allow you to CREATE/UPDATE or EXTRACT an account respectively. In Service classes there are no actual logics: based on the request received in input they allow you to move from Controller, in which the API is exposed, to the Component, in which all the logic required by the use case is carried out.
-
-
All the actual logic is delegated to the classes annotated with @Component: it is therefore the components that carry out the processing (for example search in code the class named AccountUpsertImpl)
In summary:
External System’s request ↔️ API exposed in RestController ↔️ method exposed in Service interface ↔️ logic entirely delegated to Component
So, considering that Component is responsible for all the work, let's see in a little more detail what it does:
-
Executes validation on the external request​
-
Maps external code to internal ID​ to correctly interact with the Private APIs
-
Executes other API Logic​
In this guide we will see the possible API’s customizations and how to best apply them.
Let’s see in detail the following: