One of the key features of the Documents plugin is the ability to generate new documents using custom templates, which can be pre-filled with data relevant to the current process instance.
These templates can be easily configured using the What you see is what you get (WYSIWYG). You can create and manage your templates by accessing the Document Templates section in FlowX Designer.
The Documents plugin simplifies the document generation process through predefined templates. This example focuses on generating documents using HTML templates.
Access permissions: Ensure that you have the necessary permissions to manage documents templates (more details, here). The user account used for these operations should have the required access rights.
Kafka configuration: Verify that the Kafka messaging system is properly configured and accessible. The documents plugin relies on Kafka for communication between nodes.
To begin the document generation process, HTML templates must be created or imported. Utilize the WYSIWYG editor accessible through FLOWX Designer → Plugins → Document templates.
Learn more about managing HTML templates:
Before using templates, ensure they are in a Published state. Document templates marked as Draft/In Progress will not undergo the generation process.
We’ve created a comprehensive FlowX.AI Academy course guiding you through the process of Creating a Document Template in Designer. Access the course here for detailed instructions and insights.
Consider a scenario where you need to send a personalized document to a customer based on specific details they provide. Create a process involving a User task, a Send Message Task (Kafka), and a Receive Message Task (Kafka).
In the initial user task node, users input information.
The second node (Kafka send) creates a request with a specified template and keys corresponding to user-filled values.
The third node sends the reply with the generated document under the specified key.
In this example, three UI elements, comprising two input fields and a select (dropdown), will be used. Subsequently, leverage the keys associated with these UI elements to establish a binding with the template. This binding enables dynamic adjustments to the template based on user-input values, enhancing flexibility and customization.
ai.flowx.in.document.html.in
.To identify your defined topics in your current environment, follow the next steps:
KafkaTopicsHealthCheckIndicator
line and then details → configuration → topic → document → generate. Under HTML and PDF you will find the in and out topics for generating HTML or PDF documents.When incorporating templates into the execution of a process, the extracted default values will be in accordance with the specifications of the default language configured in the system. For instance, if the default language is set to English, the template’s default values will reflect those assigned to the English version. Make sure to match the language of your template with the default language of the system.
To verify the default language of the platform, navigate to FlowX Designer → Content Management → Languages.
Ultimately, the configuration should resemble the presented image:
Configure the third node (Receive Message Task):
ai.flowx.updates.document.html.generate.v1
and its key: generatedDocuments
The response, containing information about the generated documents, is sent to the output Kafka topic defined in the Kafka Receive Event Node. The response includes details such as file IDs, document types, and storage paths.
Here is an example of a response after generation (received on generatedDocuments
key):
Upon document generation, you now have the capability to present it using the Document Preview UI element. To facilitate this, let’s optimize the existing process by introducing two supplementary nodes:
Task node: This node is designated to generate the document path from the storage solution, specifically tailored for the Document Preview.
User task: In this phase, we seamlessly integrate the Document Preview UI Element. Here, we incorporate a key that contains the download path generated in the preceding node.
For detailed instructions on displaying a generated or uploaded document, refer to the example provided in the following section:
One of the key features of the Documents plugin is the ability to generate new documents using custom templates, which can be pre-filled with data relevant to the current process instance.
These templates can be easily configured using the What you see is what you get (WYSIWYG). You can create and manage your templates by accessing the Document Templates section in FlowX Designer.
The Documents plugin simplifies the document generation process through predefined templates. This example focuses on generating documents using HTML templates.
Access permissions: Ensure that you have the necessary permissions to manage documents templates (more details, here). The user account used for these operations should have the required access rights.
Kafka configuration: Verify that the Kafka messaging system is properly configured and accessible. The documents plugin relies on Kafka for communication between nodes.
To begin the document generation process, HTML templates must be created or imported. Utilize the WYSIWYG editor accessible through FLOWX Designer → Plugins → Document templates.
Learn more about managing HTML templates:
Before using templates, ensure they are in a Published state. Document templates marked as Draft/In Progress will not undergo the generation process.
We’ve created a comprehensive FlowX.AI Academy course guiding you through the process of Creating a Document Template in Designer. Access the course here for detailed instructions and insights.
Consider a scenario where you need to send a personalized document to a customer based on specific details they provide. Create a process involving a User task, a Send Message Task (Kafka), and a Receive Message Task (Kafka).
In the initial user task node, users input information.
The second node (Kafka send) creates a request with a specified template and keys corresponding to user-filled values.
The third node sends the reply with the generated document under the specified key.
In this example, three UI elements, comprising two input fields and a select (dropdown), will be used. Subsequently, leverage the keys associated with these UI elements to establish a binding with the template. This binding enables dynamic adjustments to the template based on user-input values, enhancing flexibility and customization.
ai.flowx.in.document.html.in
.To identify your defined topics in your current environment, follow the next steps:
KafkaTopicsHealthCheckIndicator
line and then details → configuration → topic → document → generate. Under HTML and PDF you will find the in and out topics for generating HTML or PDF documents.When incorporating templates into the execution of a process, the extracted default values will be in accordance with the specifications of the default language configured in the system. For instance, if the default language is set to English, the template’s default values will reflect those assigned to the English version. Make sure to match the language of your template with the default language of the system.
To verify the default language of the platform, navigate to FlowX Designer → Content Management → Languages.
Ultimately, the configuration should resemble the presented image:
Configure the third node (Receive Message Task):
ai.flowx.updates.document.html.generate.v1
and its key: generatedDocuments
The response, containing information about the generated documents, is sent to the output Kafka topic defined in the Kafka Receive Event Node. The response includes details such as file IDs, document types, and storage paths.
Here is an example of a response after generation (received on generatedDocuments
key):
Upon document generation, you now have the capability to present it using the Document Preview UI element. To facilitate this, let’s optimize the existing process by introducing two supplementary nodes:
Task node: This node is designated to generate the document path from the storage solution, specifically tailored for the Document Preview.
User task: In this phase, we seamlessly integrate the Document Preview UI Element. Here, we incorporate a key that contains the download path generated in the preceding node.
For detailed instructions on displaying a generated or uploaded document, refer to the example provided in the following section: