Integration Flows Overview
Learn about creating and managing Integration Flows in Weik.io
Integration Flows are Apache Camel-based integrations that connect systems, transform data, and automate workflows. They provide 300+ connectors and enterprise integration patterns.
What are Integration Flows?
Integration Flows are Apache Camel-based integrations that define how systems interact and exchange data:
- Connect to sources (HTTP endpoints, files, databases, message queues, timers)
- Process and transform data
- Deliver results to destinations (APIs, files, databases)
Integration Flows can be developed using any Apache Camel DSL - YAML DSL (recommended for readability and maintainability), Java DSL, XML DSL, or any other Camel-supported DSL.
Key Concepts
Apache Camel
Weik.io uses Apache Camel as its integration engine:
- 300+ components for systems and protocols
- Enterprise Integration Patterns (EIP)
- YAML DSL with WYSIWYG editors and ability to work directly at code level
- Proven stability and performance
Routes
Routes define how data flows through an Integration Flow. One integration can contain multiple routes:
- Source - HTTP endpoint, file system, database, message queue
- Processing - Transformations, filters, enrichment
- Destination - API, file, database, message queue
Routes can be developed using any Apache Camel DSL (YAML, Java, XML, etc.). YAML DSL is recommended for readability and maintainability.
Components
Components connect to systems and protocols. Apache Camel provides 300+ components:
- HTTP/REST APIs
- Databases (SQL, NoSQL)
- File systems (FTP, SFTP, cloud storage)
- Message queues (NATS, Kafka, RabbitMQ)
- Email (SMTP, IMAP)
- Cloud services (AWS, Azure, GCP)
See the complete list at Apache Camel Components.
Transformations
Transform data between formats:
- JSON, XML, CSV conversions
- Field mapping and enrichment
- Custom transformations with scripts
Developer Workflow
Develop and test Integration Flows locally, then deploy to Weik.io for orchestration:
- Develop locally - Use Camel JBang for command-line development, or visual editors like Karavan and Kaoto VS Code extensions for WYSIWYG editing
- Store configuration - Add frequently used values (database connections, API keys, email addresses) as variables in Weik.io
- Reference variables - Use variables in your integration’s
application.propertiesfile (see Using Variables) - Add logging - Use the
weikio-loggerkamelet in your routes for troubleshooting and monitoring - Set requirements - Specify where your integration should run (e.g.,
location=onpremise,environment=linux) - Push to Weik.io - Deploy your Integration Flow to the platform using
weikio integration push - Start the flow - Use
weikio integration flows startto have Weik.io orchestrate execution on matching agents
Common Integration Patterns
Integration Flows can be used to solve various integration patterns, including but not limited to the following:
Event-Driven Integrations
Triggered by events:
- New files in directories
- Messages on queues
- Webhooks from APIs
- Database changes
- from:
uri: "file:/data/inbox"
steps:
- marshal:
json: {}
- to:
uri: "https://api.example.com/data"
This integration watches a directory for new files, converts each file to JSON, and sends it to an API endpoint.
Scheduled Integrations
Execute on a schedule:
- Periodic data synchronization
- Batch processing
- Regular data exports
- from:
uri: "timer:sync?period=300000"
steps:
- to:
uri: "sql:SELECT * FROM orders WHERE status = 'pending'"
- marshal:
json: {}
- to:
uri: "https://api.example.com/orders"
This integration runs every 5 minutes (300000ms), fetches pending orders from a database, converts them to JSON, and sends them to an API endpoint.
API-Based Integrations
Expose Integration Flows as REST APIs:
- Accept HTTP requests
- Process in real-time
- Return synchronous responses
- from:
uri: "platform-http:/api/orders"
parameters:
httpMethodRestrict: "POST"
steps:
- unmarshal:
json: {}
- to:
uri: "sql:INSERT INTO orders (data) VALUES (:#${body})"
- setBody:
constant: '{"status": "created"}'
This integration exposes a REST API endpoint at /api/orders that accepts POST requests, parses JSON payloads, stores them in a database, and returns a success response.
Integration Patterns
Message Translation
Transform formats between systems (XML to JSON, CSV to XML).
Content Enrichment
Enhance data with lookups from databases or APIs.
Content-Based Routing
Route messages to different destinations based on content.
Aggregation
Combine multiple messages into a single message.
What’s Next
- Create Your First Integration Flow - Step-by-step tutorial
- Using Variables - Manage configuration
- Services - Expose integration flows as REST services
- Entity Store - Persistent storage for integration flows