Skip to main content

Define needed Kafka topics

Kafka topic names can be set by using environment variables:
  • KAFKA_TOPIC_OTP_VALIDATE_IN - the event sent on this topic (with an OTP and an identifier) will check if the OTP is valid
  • KAFKA_TOPIC_OTP_VALIDATE_OUT - the response for this request will validate an OTP, the reply is sent back to the Engine on this topic
You can check the defined topics by going to FlowX Designer > Platform Status > notification-plugin-mngt > kafkaTopicsHealthCheckIndicator > details > configuration > topic > otp.
The Engine is listening for messages on topics with names of a certain pattern, make sure to use an outgoing topic name that matches the pattern configured in the Engine.

Request to validate an OTP

Values expected in the request body:
  • processInstanceId = process instance ID
  • client id = the user unique ID in the system
  • channel = notification channel: SMS/MAIL
  • otp = OTP code that you received, used to compare with the one that was sent from the system
Example:
{ 
    "processInstanceId": 12345, 
    "clientId": "1871201460101", 
    "channel": "MAIL", 
    "otp": "1111" 
}

Reply from validate OTP

The response is sent back to the Engine on the KAFKA_TOPIC_OTP_VALIDATE_OUT topic. The reply body holds the following values:
FieldDescription
processInstanceIdProcess instance ID
clientIdThe user unique ID in the system
channelNotification channel used
otpValidConfirmation whether the provided OTP code matched the one sent from the system: true or false
{
  "processInstanceId": 12345,
  "clientId": "1871201460101",
  "channel": "MAIL",
  "otpValid": true
}

Example: validate an OTP from a business flow

Similar to the generation of the OTP you can validate the OTP that was generated for an identifier.
  1. Check that the needed topics are configured correctly: (KAFKA_TOPIC_OTP_VALIDATE_IN and KAFKA_TOPIC_OTP_VALIDATE_OUT)
  2. Add the actions for sending the request to validate the OTP on the node that contains the ‘Generate OTP’ actions
  3. Add the proper configuration to the action, the Kafka topic and configure the body message.
  1. Add a node to the process definition (for the Receive Message Task)
  2. Configure on what key you want to receive the response on the process instance parameters
Last modified on June 11, 2026