The Task Management plugin is available as a Docker image and serves as a dedicated microservice within the FlowX platform ecosystem.
Dependencies
Before setting up the plugin, ensure you have the following dependencies:
A MongoDB database for task storage
A connection to the RuntimeDB for operational data
Access to the database used by the FlowX Engine
Connection to the Kafka instance used by the FlowX Engine
A Redis instance for caching and performance optimization
While many configuration properties come pre-configured, several environment variables must be explicitly set for proper functionality.
Authorization configuration & access roles
Configure the following variables to connect to your identity management platform:
Environment Variable Description Default Value SECURITY_OAUTH2_BASESERVERURL
Base URL of your OpenID Connect provider - SECURITY_OAUTH2_CLIENT_CLIENTID
Client ID for authentication - SECURITY_OAUTH2_CLIENT_CLIENTSECRET
Client secret for authentication - SECURITY_OAUTH2_REALM
Security realm for the application - SECURITY_OAUTH2_SERVICEACCOUNT_ADMIN_CLIENTID
Service account client ID for process initiation flowx-task-management-plugin-sa
SECURITY_OAUTH2_SERVICEACCOUNT_ADMIN_CLIENTSECRET
Service account client secret -
A dedicated service account must be configured in your OpenID provider to allow the Task Management microservice to access realm-specific data and perform operations.
OpenID connect settings
The Task Management plugin supports Microsoft Entra ID as an OpenID provider.
Environment Variable Description Default Value OPENID_PROVIDER
Type of OpenID provider keycloak
(possible values: keycloak
, entra
)OPENID_ENTRA_TENANTID
Tenant ID for Microsoft Entra ID - OPENID_ENTRA_PRINCIPALID
Principal ID for Microsoft Entra ID - OPENID_ENTRA_GRAPHSCOPE
Graph scope for Microsoft Entra ID https://graph.microsoft.com/.default
For more detailed information about configuring the service account:
Task Management Service Account
FlowX Engine datasource configuration
The service needs access to process instance data from the engine database. Configure these connection parameters:
Environment Variable Description Default Value SPRING_DATASOURCE_URL
JDBC URL for the engine database jdbc:postgresql://onboardingdb:5432/onboarding
SPRING_DATASOURCE_USERNAME
Database username postgres
SPRING_DATASOURCE_PASSWORD
Database password password
MongoDB configuration
Configure access to the primary MongoDB instance:
Environment Variable Description Default Value SPRING_DATA_MONGODB_URI
MongoDB connection URI mongodb://${DB_USERNAME}:${DB_PASSWORD}@mongodb-0.mongodb-headless,mongodb-1.mongodb-headless,mongodb-arbiter-0.mongodb-arbiter-headless:27017/task-management-plugin
DB_USERNAME
MongoDB username task-management-plugin
DB_PASSWORD
MongoDB password password
Task Manager requires a runtime connection to function correctly. Starting the service without a configured and active runtime MongoDB connection is not supported.
Runtime MongoDB configuration
Task Manager requires a runtime connection to function correctly. Starting the service without a configured and active runtime MongoDB connection is not supported.
Enable the Runtime MongoDB connection:
Environment Variable Description Default Value SPRING_DATA_MONGODB_RUNTIME_ENABLED
Enable runtime MongoDB connection true
SPRING_DATA_MONGODB_RUNTIME_URI
URI for connecting to MongoDB Runtime mongodb://${RUNTIME_DB_USERNAME}:${DB_PASSWORD}@mongodb-0.mongodb-headless,mongodb-1.mongodb-headless,mongodb-arbiter-0.mongodb-arbiter-headless:27017/app-runtime?retryWrites=false
RUNTIME_DB_USERNAME
Username for runtime database app-runtime
RUNTIME_DB_PASSWORD
Password for runtime database password
Redis configuration
Configure the Redis cache with these parameters:
Configure the Redis cache with these parameters:
Environment Variable Description Default Value SPRING_REDIS_HOST
Redis server hostname or IP address localhost
SPRING_REDIS_PORT
Redis server port 6379
SPRING_REDIS_PASSWORD
Authentication password for Redis password
REDIS_TTL
Time-to-live for cached items (milliseconds) 5000000
Kafka configuration
Configure the Kafka integration using these environment variables:
Core Kafka settings
Environment Variable Description Default Value SPRING_KAFKA_BOOTSTRAPSERVERS
Address of the Kafka server(s) localhost:9092
SPRING_KAFKA_SECURITYPROTOCOL
Security protocol for Kafka connections PLAINTEXT
SPRING_KAFKA_CONSUMER_GROUPID
Consumer group identifier kafka-task-management-consumer
KAFKA_MESSAGE_MAX_BYTES
Maximum message size (bytes) 52428800
(50MB)KAFKA_AUTHEXCEPTIONRETRYINTERVAL
Retry interval after authorization exceptions (seconds) 10
KAFKA_CONSUMER_THREADS
Number of consumer threads 3
KAFKA_CONSUMER_EXCLUDEUSERSTHREADS
Number of threads for processing user exclusion events 3
Topic naming configuration
Environment Variable Description Default Value KAFKA_TOPIC_NAMING_SEPARATOR
Primary separator for topic names .
KAFKA_TOPIC_NAMING_SEPARATOR2
Secondary separator for topic names -
KAFKA_TOPIC_NAMING_PACKAGE
Package prefix for topic names ai.flowx.
KAFKA_TOPIC_NAMING_ENVIRONMENT
Environment segment for topic names
KAFKA_TOPIC_NAMING_VERSION
Version suffix for topic names .v1
Kafka topics
Process management topics
Environment Variable Description Default Value KAFKA_TOPIC_PROCESS_START_OUT
Topic for running hooks ai.flowx.dev.core.trigger.start.process.v1
KAFKA_TOPIC_PROCESS_OPERATIONS_OUT
Topic for task operations (assign, unassign, etc.) ai.flowx.dev.core.trigger.operation.v1
KAFKA_TOPIC_PROCESS_OPERATIONS_BULKOUT
Topic for bulk operations on tasks ai.flowx.dev.core.trigger.operations.bulk.v1
Scheduling topics
Environment Variable Description Default Value KAFKA_TOPIC_PROCESS_SCHEDULE_IN
Topic for receiving scheduler messages for hooks ai.flowx.dev.plugin.tasks.trigger.run.hook.v1
KAFKA_TOPIC_PROCESS_SCHEDULE_OUT_SET
Topic for setting schedules ai.flowx.dev.core.trigger.set.schedule.v1
KAFKA_TOPIC_PROCESS_SCHEDULE_OUT_STOP
Topic for stopping schedules ai.flowx.dev.core.trigger.stop.schedule.v1
User management topics
Environment Variable Description Default Value KAFKA_TOPIC_EXCLUDEUSERS_SCHEDULE_IN
Topic for user exclusion events ai.flowx.dev.plugin.tasks.trigger.exclude.users.v1
Task operations topics
Environment Variable Description Default Value KAFKA_TOPIC_TASK_IN
Topic for incoming task creation messages ai.flowx.dev.plugin.tasks.trigger.save.task.v1
Events and integration topics
Environment Variable Description Default Value KAFKA_TOPIC_EVENTSGATEWAY_OUT_MESSAGE
Topic for Events Gateway messages ai.flowx.dev.eventsgateway.receive.taskmanager.commands.message.v1
KAFKA_TOPIC_RESOURCESUSAGES_REFRESH
Topic for resource usage refresh events ai.flowx.dev.application-version.resources-usages.refresh.v1
The Engine listens for messages on topics with specific naming patterns. Ensure you use the correct outgoing topic names when configuring the Task Management plugin to maintain proper communication with the engine.
Logging configuration
Control logging verbosity with these environment variables:
Environment Variable Description Default Value LOGGING_LEVEL_ROOT
Root Spring Boot microservice logs - LOGGING_LEVEL_APP
Application-level logs DEBUG
LOGGING_LEVEL_MONGO_DRIVER
MongoDB driver logs INFO
LOGGING_LEVEL_REDIS
Redis/Lettuce client log level OFF
Filtering feature
Environment Variable Description FLOWX_ALLOW_USERNAME_SEARCH_PARTIAL
Enables filtering possible assignees by partial names
Scheduled jobs
Configure scheduled maintenance jobs:
Environment Variable Description Default Value SCHEDULER_USERSCACHESCLEANUP_CRONEXPRESSION
Cron expression for user cache cleanup 0 0 0 * *?
(daily at midnight)
Resource usage monitoring
The plugin includes a resource usage monitoring feature that can be configured:
Environment Variable Description Default Value FLOWX_LIB_RESOURCESUSAGES_ENABLED
Enable resource usage tracking true
FLOWX_LIB_RESOURCESUSAGES_REFRESHLISTENER_ENABLED
Enable refresh listener true
FLOWX_LIB_RESOURCESUSAGES_REFRESHLISTENER_COLLECTOR_THREADCOUNT
Number of threads for resource collection 5
FLOWX_LIB_RESOURCESUSAGES_REFRESHLISTENER_COLLECTOR_MAXBATCHSIZE
Maximum batch size for collection 1000
FLOWX_LIB_RESOURCESUSAGES_KAFKA_CONSUMER_GROUPID_RESOURCESUSAGES_REFRESH
Consumer group for resource usage refresh events taskMgmtResourcesUsagesRefreshGroup
FLOWX_LIB_RESOURCESUSAGES_KAFKA_CONSUMER_THREADS_RESOURCESUSAGES_REFRESH
Number of threads for processing resource usage events 3
Database migration
The Task Management plugin uses Mongock for MongoDB migrations:
Environment Variable Description Default Value MONGOCK_CHANGELOGSSCANPACKAGE
Package to scan for database change logs ai.flowx.task.management.config.mongock