Skip to main content

Infrastructure prerequisites

The FlowX Engine requires the following components to be set up before it can be started:
  • Docker Engine (version 17.06 or higher)
  • Kafka (version 2.8 or higher)
  • Elasticsearch (version 7.11.0 or higher)
  • Database instance

Dependencies

The FlowX Engine has dependencies on the following components: For Microservices architecture, some Microservices holds their data individually using separate Databases. A basic Postgres configuration can be set up using a helm values.yaml file as it follows:
  • helm values.yaml:

Redis server

A Redis cluster is required for caching process definitions, compiled scripts, and Kafka responses.

Kafka cluster

Kafka serves as the backbone of the engine, facilitating communication with external plugins and integrations.
Details about setting up logging via Elasticsearch, monitoring, and tracing via Open Telemetry can be found here.

Configuration

FlowX.AI Engine utilizes environment variables for configuration. Below are the key environment variables you need to configure:

Authorization & access roles

This section outlines the OAuth2 configuration settings for securing the Spring application, including resource server settings, security type, and access authorizations.

Resource Server Settings (OAuth2 Configuration)

Old configuration from < v4.1 releases (will be deprecated in v4.5):
  • SECURITY_OAUTH2_BASE_SERVER_URL: The base URL for the OAuth 2.0 Authorization Server, which is responsible for authentication and authorization for clients and users, it is used to authorize clients, as well as to issue and validate access tokens.
  • SECURITY_OAUTH2_CLIENT_CLIENT_ID: A unique identifier for a client application that is registered with the OAuth 2.0 Authorization Server, this is used to authenticate the client application when it attempts to access resources on behalf of a user.
  • SECURITY_OAUTH2_CLIENT_CLIENT_SECRET: Secret Key that is used to authenticate requests made by an authorization client.
  • SECURITY_OAUTH2_REALM: Security configuration env var in the Spring Security OAuth2 framework, it is used to specify the realm name used when authenticating with OAuth2 providers.
New configuration, starting from v4.1 release, available below.

Service account settings

This section contains the environment variables for configuring process engine service account. More details about the necessary service account, here: Process engine service account

Security configuration

Configuring Kafka

Kafka handles all communication between the FlowX.AI Engine and external plugins and integrations. It is also used for notifying running process instances when certain events occur.

Kafka connection settings

Kafka consumer retry settings

Consumer groups & consumer threads configuration

Both a producer and a consumer must be configured:

Configuring a Kafka Producer

Configuring a Kafka Consumer

Consumer groups & consumer threads

In Kafka a consumer group is a group of consumers that jointly consume and process messages from one or more Kafka topics. Each consumer group has a unique identifier called a group ID, which is used by Kafka to manage message consumption and distribution among the members of the group. Thread numbers, on the other hand, refer to the number of threads that a consumer application uses to process messages from Kafka. By default, each consumer instance runs in a single thread, which can limit the throughput of message processing. Increasing the number of consumer threads can help to improve the parallelism and efficiency of message consumption, especially when dealing with high message volumes. Both group IDs and thread numbers can be configured in Kafka to optimize the processing of messages according to specific requirements, such as message volume, message type, and processing latency. The configuration related to consumers (group ids and thread numbers) can be configured separately for each message type as it follows:

Consumer Group Configuration

Consumer Thread Configuration

It is important to know that all the events that start with a configured pattern will be consumed by the engine. This makes it possible to create a new integration and connect it to the engine without changing the configuration of the engine.

Configuring kafka topics

The suggested topic pattern naming convention is the following:

OPERATIONS_IN request example

BULK_IN request example

If you need to send additional keys on the response, attach them in the header, as in the following example, where we used requestID key.
A response should be sent on a callbackTopic if it is mentioned in the headers, as in the following example:
Task manager operations could be the following: assignment, unassignment, hold, unhold, terminate and it is matched with the ...operations.out topic on the engine side. For more information check the Task Management plugin documentation:📄 Task management plugin
Scheduler

Using the scheduler

Processes that can be started by sending messages to a Kafka topic

Configuring file upload size

The maximum file size allowed for uploads can be set by using the following environment variables:

Configuring Advancing controller

To use advancing controller, the following env vars are needed for process-engine to connect to Advancing Postgres DB:

Advancing controller setup

Configuring cleanup mechanism

This section contains environment variables that configure the scheduler’s behavior, including thread count, cron jobs for data partitioning, process cleanup, and master election.

Managing Subprocesses Expiration

This section details the environment variable that controls the expiration of subprocesses within a parent process. It determines whether subprocesses should terminate when the parent process expires or follow their own expiration settings.

Partitioning and archiving

The Partitioning and Archiving feature is optional and can be configured as needed.
For more details about process instance partitioning and archiving, including configuration of the feature, see:

Process instance partitioning and archiving

Last modified on July 7, 2026