Skip to main content
The plugin is available as a docker image.

Dependencies

Before setting up the plugin, ensure that you have the following dependencies installed and configured:
  • PostgreSQL Database: You will need a PostgreSQL database to store data related to document templates and documents.
  • MongoDB Database: MongoDB is required for the HTML templates feature of the plugin.
  • Kafka: Establish a connection to the Kafka instance used by the FlowX.AI engine.
  • Redis: Set up a Redis instance for caching purposes.
  • S3-Compatible File Storage Solution: Deploy an S3-compatible file storage solution to store document files.

Configuration

The plugin comes with pre-filled configuration properties, but you need to set up a few custom environment variables to tailor it to your specific setup. Here are the key configuration steps:

Redis server

The plugin can utilize the Redis component already deployed for the FLOWX.AI engine. Make sure it is configured properly.

Authorization configuration

The Documents plugin validates incoming tokens with the JWT public key mechanism:
Upgrading from 5.1.x? Remove the legacy opaque-token env vars: SECURITY_OAUTH2_REALM, SECURITY_OAUTH2_CLIENT_CLIENTID, and SECURITY_OAUTH2_CLIENT_CLIENTSECRET. These belong to the removed introspection model and prevent the service from starting on 5.9.x. See the authentication and IAM migration guide for the full list.

Document processing configuration

Set the FLOWX_HTML_TEMPLATES_PDFFONTPATHS config to select the font used for generating documents based on PDF templates.
If you want to use specific fonts in your PDF templates, override the FLOWX_HTML_TEMPLATES_PDFFONTPATHS config. By default, Calibri and DejaVuSans are available fonts.
FLOWX_CONVERT_DPI: Sets the DPI (dots per inch) for PDF to JPEG conversion. Higher values result in higher resolution images. (Default value: 150).
After making these configurations, the fonts will be available for use within PDF templates.

Database configuration

SQL database (PostgreSQL)

The Documents Plugin uses a PostgreSQL database for relational data storage.

Primary MongoDB configuration

Runtime MongoDB configuration

Redis configuration

Document Plugin uses Redis for caching. Configure Redis connection using the standard Redis environment variables. Quick reference:
Both SPRING_DATA_REDIS_* and SPRING_REDIS_* variable prefixes are supported. The SPRING_DATA_REDIS_* prefix is the modern Spring Boot standard and is recommended for new deployments.
For advanced Redis deployment modes (Sentinel, Cluster) and SSL/TLS setup, see the Redis Configuration guide. Note that Sentinel and Cluster modes are only supported by the Events Gateway service.

Multipart upload configuration


Basic Kafka configuration

OAuth authentication (when using SASL_PLAINTEXT)

When using the kafka-auth profile, the security protocol will automatically be set to SASL_PLAINTEXT and the SASL mechanism will be set to OAUTHBEARER.

Topic naming configuration


Thread configuration


Document topics

Generate HTML documents

Document persistence

Document splitting

Document URL retrieval

OCR processing


File operation topics

File deletion

File update

File conversion

File persistence

File combination

File encryption

File decryption

File archive

Bundle a list of fileIds into a single (optionally password-protected) ZIP, persisted as a new Document/File. Uses the same trigger/reply pattern as encryption.

File extract

Unpack a ZIP fileId into N persisted Documents/Files. Supports plain and password-protected archives.

Bulk document persistence

UI flow session variable updates

After a UI Flow session document upload completes, the document-plugin sends the result to the process-engine so the session variables are updated automatically.

UI Flow multi-file upload

When a UI Flow uploads several files at once, the process-engine sends a single bulk command to document-plugin instead of one command per file. The document-plugin persists each file in the session and emits a single SSE frame (eventType=UI_FLOW_FILE_UPLOAD_MULTIPLE, namespace=uploadBatchId) at the end of the batch via events-gateway, then forwards the per-file results to KAFKA_TOPIC_UIFLOW_UPDATE_OUT.

Audit

General storage configuration

APPLICATION_FILESTORAGE_DELETIONSTRATEGY:
  • disabled: This will disable entirely the deletion of temporary files from the temporary bucket, and the responsibility to delete and clean up the bucket will move in the ownership of the admins of the implementing project.
  • deleteBypassingGovernanceRetention: This will still delete the temporary files and further more will add in the delete request the header: x-amz-bypass-governance-retention:true , to enable deletion of governed files, in case the s3 configured user for document-plugin, will have the s3:BypassGovernanceRetention permission.
APPLICATION_FILESTORAGE_TESTFILESBUCKET: This variable allows you to override the default -test-documents bucket suffix. You can configure a custom bucket name or use the same bucket as the main storage if needed. This is particularly useful when the client environment has restrictions on bucket naming conventions or doesn’t have permissions to create new buckets.

Runtime buckets configuration

Zip extraction configuration


S3-Compatible storage configuration

Make sure to follow the recommended bucket naming rules when choosing the bucket prefix name.

CAS lib configuration


Logging configuration


Ingress and CORS

The Document plugin is exposed on both the admin and public hosts. Routing is configured through the FlowX Helm chart, which renders either a Kubernetes Ingress (default) or a Gateway API HTTPRoute per service. CORS handling lives in the service code; only the allowed-origins list is deployment-specific.

Service routes

Paths are set through services.document-plugin.ingress.admin.path / services.document-plugin.ingress.public.path (or the corresponding gateway.<key>.paths) in the chart values. The chart also applies nginx.ingress.kubernetes.io/proxy-body-size: 50m by default on both routes to allow larger document uploads — adjust the annotation if you need a different limit.

CORS configuration

Allowed methods, allowed headers (including Authorization, Content-Type, Fx-Workspace-Id), and credential handling are baked into the service’s application.yaml with safe defaults. Override these only if you have a non-standard requirement. For the complete route reference, Gateway API HTTPRoute configuration, and route customization, see the ingress configuration guide.

Troubleshooting

Common issues

Symptoms: File uploads return errors or time out.Solutions:
  1. Verify the S3/MinIO connection by checking APPLICATION_FILESTORAGE_S3_SERVERURL, APPLICATION_FILESTORAGE_S3_ACCESSKEY, and APPLICATION_FILESTORAGE_S3_SECRETKEY
  2. Ensure the target bucket exists and the configured user has read/write permissions
  3. Check that SPRING_SERVLET_MULTIPART_MAXFILESIZE is large enough for the files being uploaded
  4. Verify network connectivity between the pod and the S3-compatible storage service
Symptoms: HTML-to-PDF document generation fails or produces empty documents.Solutions:
  1. Verify FLOWX_HTML_TEMPLATES_ENABLED is set to true
  2. Check that the font paths in FLOWX_HTML_TEMPLATES_PDFFONTPATHS are valid and the font files exist at those paths
  3. Ensure the Kafka topics for HTML generation (KAFKA_TOPIC_DOCUMENT_GENERATE_HTML_IN / OUT) are created and accessible
  4. Verify MongoDB connectivity, as HTML templates are stored in MongoDB
Symptoms: The temporary S3 bucket grows continuously and files are not cleaned up.Solutions:
  1. Check that APPLICATION_FILESTORAGE_DELETIONSTRATEGY is set to delete (not disabled)
  2. If using governance-locked buckets, set the strategy to deleteBypassingGovernanceRetention and ensure the S3 user has the s3:BypassGovernanceRetention permission
  3. Verify the temporary bucket name configured in APPLICATION_FILESTORAGE_S3_TEMPBUCKET matches the actual bucket
  4. Check application logs for deletion errors or permission issues
Symptoms: File conversion requests fail or return errors.Solutions:
  1. Check that the source file format is in the supported list configured via ZIP_EXTRACTION_ALLOWEDEXTENSIONS
  2. Verify FLOWX_CONVERT_DPI is set to a valid value (default 150)
  3. Ensure the file is not corrupted and uses valid encoding
  4. Check that the Kafka topics for file conversion (KAFKA_TOPIC_FILE_CONVERT_IN / OUT) are properly configured

Uploading Documents

Upload documents to processes using the Documents plugin

Generating Documents

Generate documents from HTML templates

Redis Configuration

Complete Redis setup including Sentinel and Cluster modes
Last modified on June 25, 2026