Mock integrations
If you need to test the business process flow but haven't completed all integrations, you can still do so by utilizing the mock integrations server included in the platform.
Setup
To begin, configure the microservice's DB settings to use a Postgres DB. Then, deploy the mocked adapter microservice.
Adding a new integration
Setting up a mocked integration requires only one step: adding a mock Kafka request and response.
You have two options for accomplishing this:
- Add the information directly to the DB.
- Use the provided API.
For each Kafka message exchange between the engine and the integration, you need to create a separate entry.
POST MOCK_ADAPTER_URL/api/kafka-exchanges/
Add new Kafka exchange mock
Parameters
Body
sentMessageJson
(string) - the mocked JSON message that the integration will sendreceivedMessageJson
(string) - the JSON message the integration should reply withoutgoingTopic
(string) - should match the topic the engine listens on for replies from the integrationincomingTopic
(string) - should match the topic name that the integration listens on
Responses
200 - returns the newly added Kafka exchange
GET MOCK_ADAPTER_URL/api/kafka-exchanges/
View all available Kafka exchanges
Retrieves the complete list of all available mocked Kafka exchange messages.
Parameters
Path
string
Responses
200