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: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).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 offileIds 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 ZIPfileId 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 thes3:BypassGovernanceRetentionpermission.
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
File upload fails
File upload fails
Symptoms: File uploads return errors or time out.Solutions:
- Verify the S3/MinIO connection by checking
APPLICATION_FILESTORAGE_S3_SERVERURL,APPLICATION_FILESTORAGE_S3_ACCESSKEY, andAPPLICATION_FILESTORAGE_S3_SECRETKEY - Ensure the target bucket exists and the configured user has read/write permissions
- Check that
SPRING_SERVLET_MULTIPART_MAXFILESIZEis large enough for the files being uploaded - Verify network connectivity between the pod and the S3-compatible storage service
Document generation not working
Document generation not working
Symptoms: HTML-to-PDF document generation fails or produces empty documents.Solutions:
- Verify
FLOWX_HTML_TEMPLATES_ENABLEDis set totrue - Check that the font paths in
FLOWX_HTML_TEMPLATES_PDFFONTPATHSare valid and the font files exist at those paths - Ensure the Kafka topics for HTML generation (
KAFKA_TOPIC_DOCUMENT_GENERATE_HTML_IN/OUT) are created and accessible - Verify MongoDB connectivity, as HTML templates are stored in MongoDB
Files not being deleted from temporary storage
Files not being deleted from temporary storage
Symptoms: The temporary S3 bucket grows continuously and files are not cleaned up.Solutions:
- Check that
APPLICATION_FILESTORAGE_DELETIONSTRATEGYis set todelete(notdisabled) - If using governance-locked buckets, set the strategy to
deleteBypassingGovernanceRetentionand ensure the S3 user has thes3:BypassGovernanceRetentionpermission - Verify the temporary bucket name configured in
APPLICATION_FILESTORAGE_S3_TEMPBUCKETmatches the actual bucket - Check application logs for deletion errors or permission issues
PDF conversion fails
PDF conversion fails
Symptoms: File conversion requests fail or return errors.Solutions:
- Check that the source file format is in the supported list configured via
ZIP_EXTRACTION_ALLOWEDEXTENSIONS - Verify
FLOWX_CONVERT_DPIis set to a valid value (default150) - Ensure the file is not corrupted and uses valid encoding
- Check that the Kafka topics for file conversion (
KAFKA_TOPIC_FILE_CONVERT_IN/OUT) are properly configured
Related resources
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

