What is FlowX Database?

FlowX Database (FlowX DB) is a persistence layer that allows you to store structured data independently of process instances. This enables you to:
  • Share data between different process instances
  • Store and retrieve data across multiple processes
  • Create a persistent data store within the FlowX ecosystem
  • Access structured data without directly interacting with external systems
FlowX Database is powered by the nosql-db-runner microservice, which provides MongoDB functionality within the FlowX ecosystem. This service supports both native MongoDB and Azure Cosmos DB (MongoDB API), enabling you to choose the database backend that best fits your infrastructure needs while maintaining FlowX’s workflow integration capabilities.For more information about the nosql-db-runner service and CosmosDB considerations, see the nosql-db-runner documentation.

Key concepts

In the FlowX platform, Data Sources represent connections to different data repositories. With the introduction of FlowX Database, there are now two types of data sources available in the Integration Designer:
Data Source TypeDescription
RESTful SystemTraditional integration with external REST APIs
FlowX DatabaseConnection to the internal FlowX Database for data persistence
Each FlowX Database data source represents a collection in the underlying MongoDB database.

Benefits of FlowX Database

Data Sharing

Share data between different process instances, enabling more complex workflows and business scenarios

Independence

Store data structured according to your needs, independent of external systems

Extended Use Cases

Enable new business cases that require persistent data across multiple processes

Simplified Integration

Reduce the need for creating custom connectors to external systems for basic data persistence

Native Integration

Integrate with workflows through the existing workflow designer

Complete CRUD Operations

Perform all standard Create, Read, Update, and Delete operations on your data

Bulk Operations

Handle multiple documents efficiently with insertMany, updateMany, and deleteMany operations

Flexible Querying

Use MongoDB’s powerful query syntax to filter, sort, and project your data

How to use FlowX Database

Creating a collection

1

Access Data Sources

Navigate to the β€˜Integrations’ section in the left sidebar of FlowX Designer, then click on β€˜Data Sources’.

Accessing Data Sources in the navigation menu

2

Add a new Data Source

Click the ”+” button to add a new Data Source. In the β€œAdd Data Source” dialog, select β€œFlowX Database” from the dropdown list.

Adding a new FlowX Database data source

3

Configure the collection

Provide a name and description for your collection. The name will be used to identify this database collection in your workflows.

Configuring the collection

4

Create the collection

Click β€œCreate” to save the collection in FlowX Database. Your new collection will appear in the Data Sources list with the type β€œFlowX Database”.
Each FlowX Database data source represents a collection in the underlying MongoDB database. When you create a new data source with the FlowX Database type, you’re essentially creating a new collection where your documents will be stored.

Viewing collection data

1

Navigate to collection

Go to the collection you want to view in the β€˜Data Sources’ section.
2

Access Documents tab

Click the β€˜Documents’ section within the collection.
3

Browse documents

You’ll see a listing of currently saved documents in the collection.
4

Search and filter

Use the search functionality to find specific documents in the collection.

Creating database operations

1

Access operations list

Navigate to your FlowX Database collection in the Data Sources section.
2

Create new operation

Click the ”+” button to create a new operation.

Creating a new operation for a FlowX Database collection

3

Select operation type

Choose the operation type from the dropdown (find, findOne, insertOne, insertMany, etc.).

Selecting the operation type

4

Name the operation

Give your operation a meaningful name and description that indicates its purpose.
5

Define the operation parameters

Configure the parameters for your operation based on its type. For example, for a find operation:

Configuring operation parameters

  • Filter: Define the criteria to match documents
  • Sort: Specify the sorting order
  • Projection: Select which fields to include in the results
  • Skip: For find operations, specify the number of documents to skip
  • Limit: Set the maximum number of documents to return
6

Test the operation

Use the test functionality to verify your operation works correctly.

Testing an operation

7

Save the operation

Click β€œSave” to add the operation to your collection. It will now be available for use in workflows.

Working with FlowX Database in workflows

Database node in a workflow

FlowX Database integrates directly with the workflow designer through the β€œData Source” node type:
1

Add Data Source node

In your workflow, add a new node and select the β€˜DATA_SOURCE’ type.
2

Configure data source

In the node properties panel:

Data Source node configuration

  1. Choose β€œFlowX Database” as the system type from the dropdown
  2. Select your collection from the available options
  3. Choose the operation you want to perform (find, findOne, insertOne, insertMany, updateOne, updateMany, deleteOne, deleteMany)
3

Configure operation parameters

Set the parameters for your selected operation. The available parameters will depend on the operation type:
  • filter - For find operations, define the criteria to match documents
  • sort - For find operations, specify the sorting order for results
  • document - For insert operations, define the document to insert
  • update - For update operations, define the document to update
  • delete - For delete operations, define the criteria to match documents
  • skip - For find operations, specify the number of documents to skip
  • limit - For find operations, specify the maximum number of documents to return
  • projection - For find operations, specify the fields to include or exclude in the results

Configuring operation parameters

You can use static JSON or reference process variables using the expression syntax.
4

Set response key

Specify where the operation result should be stored in the process instance. This makes the data available to subsequent nodes in your workflow.

MongoDB operations supported

FlowX Database leverages MongoDB’s powerful query capabilities through the nosql-db-runner service, providing pure MongoDB functionality. For detailed information about MongoDB query operators, filters, and syntax, refer to the MongoDB Query and Projection Operators documentation. The following MongoDB operations are supported in FlowX Database. Each tab includes practical examples that you can use as a starting point for your own operations.
Parameters:For complete documentation on find operations and query syntax, see MongoDB db.collection.find().
Always use caution with update and delete operations, especially those that affect multiple documents (updateMany, deleteMany). Always include specific filter criteria to avoid unintended changes to your data.

Real-world example: Customer management system

This example demonstrates how a customer management system could use FlowX Database to persist and share customer data across different processes.

Limitations and considerations

Best practices

Design before implementation: Plan your collections and operations carefully before implementation.
Keep document structure simple: Avoid deeply nested structures for better performance and easier querying.
Use meaningful names: Choose clear names for collections and operations.
Limit document size: Keep individual documents under 16MB for optimal performance.
Test operations thoroughly: Use the testing functionality to ensure operations work as expected.
Consider indexing: For large collections, consider indexing frequently queried fields.
Provide default values: Ensure all data types have default values (e.g., empty string for null, 0 for integers).

Troubleshooting

Summary

FlowX Database provides a powerful persistence layer that enables you to store and share data across different processes and projects. By leveraging MongoDB’s capabilities through the nosql-db-runner service, FlowX Database offers:
  1. Flexible data storage for any structured data
  2. Data sharing between process instances
  3. Integration with workflows
  4. Independence from external systems for basic data persistence

MongoDB learning resources

To get the most out of FlowX Database, familiarize yourself with MongoDB concepts and operations:

FAQs