Best practices
This guide contains best practices for designing and running flows.
Designing flows
Keep your messages clean
Within a flow a message can grow in size, because of added headers and data in the body. It is good practice to clean up your messages as much as possible, especially before communicating with endpoints.
- Use the Remove Headers component to clean up headers you are not using anymore.
- Clean up the body whenever it is not applicable anymore, for example with an empty JSON (
{}
) or XML (<root/>
).
Use variables
It's important to understand the different kinds of variables within Dovetail and how to use them to your advantage. Read more about Using variables in Dovetail.
Flow properties
It is good practice to use Flow properties for efficient configuration of settings in your flow, for example the base url of an API. Using Flow properties improves the scalability of your integration solution, making it much easier to copy similar solutions to different clients with only minor edits.
Tenant variables
It is good practice to use Tenant variables for data that is used in multiple flows or to change the functionality of a flow without having to edit and reinstall it.
Data formats
In application integration you encounter a big variety in data formats. It is good practice to:
- Use standardised data formats like XML or JSON over other formats like CSV, Excel, ASCII.
- Use text based data formats, instead of binary.
- Keep the size of messages lower than 10 MB.
Protocols
In general it's recommend to use HTTPS endpoints over other endpoint protocols like SFTP, email (SMTP) or file. HTTPS uses internet standards and scales well. For scalability also a RabbitMQ endpoint is provided.
Document your flows
Use the Notes, Component notes and Version remark to document how your flow works. It will greatly improve your understanding of a flow, especially over time. Your future self thanks you in advance!
Flow versions
Limit the number of Flow Versions to maintain application responsiveness and delete old versions when possible.
Encoding
When working with text data, it's essential to understand the encoding being used to ensure that characters are interpreted correctly. UTF-8 has become the standard for web content due to its versatility and compatibility with ASCII. Other encodings are still relevant in certain contexts, particularly for legacy systems and specific language requirements.
It is good practice to use the Encoder component to transform the encoding of a message to UTF-8 in flows for optimal compatibility with Dovetail components.