Workflow Automation
Relevant source files
The following files were used as context for generating this wiki page:
Workflow Automation is a core component of the Aether-X Ultimate platform, primarily managed by the No-Code Development service. It enables users to create, configure, and execute complex business logic and data processing sequences using natural language descriptions. This system bridges the gap between high-level user intent and the underlying microservices architecture, allowing for automated interactions between content generation, AI models, and data processing modules.
Sources: services/no-code-development/app.py:1-10, README.md:12-25, IMPLEMENTATION_COMPLETE.md:83-87
System Architecture
The workflow automation system is built on a microservices architecture where the no-code-development service acts as the orchestration engine. It interacts with the api-gateway for external requests and utilizes various databases (PostgreSQL, MySQL) for persistence.
Components and Service Interactions
The following diagram illustrates how the No-Code service orchestrates workflows through the API Gateway and interacts with specialized services.
The No-Code service (port 8004) handles the lifecycle of workflows, from generation to execution.
Sources: services/no-code-development/app.py:348, services/api-gateway/app.py:12-21, docker-compose.yml:95-108, IMPLEMENTATION_COMPLETE.md:14-22
Workflow Lifecycle
The automation process consists of three primary stages: Creation, Storage, and Execution.
1. Workflow Creation
Workflows are generated from natural language descriptions. The system parses these descriptions to define steps, configurations, and triggers. For example, descriptions containing "social media" and "influence" trigger a specialized multi-step template.
Sources: services/no-code-development/app.py:73-85, services/no-code-development/app.py:183-200
2. Execution Engine
The execution engine iterates through defined steps sequentially. Each step can represent an API call, a data processing task, or a content generation request.
The execution results include the status of each individual step and an overall success/failure report.
Sources: services/no-code-development/app.py:146-163, services/no-code-development/app.py:255-265
Data Models and Storage
Workflows are persisted across multiple database types depending on the environment. Relational schemas (PostgreSQL/MySQL) store workflow definitions and metadata, while JSON structures define the step-by-step logic.
Relational Schema (PostgreSQL/MySQL)
| Field | Type | Description |
|---|---|---|
id | SERIAL / INT | Primary Key |
name | VARCHAR(255) | Name of the workflow |
app_id | INT | Foreign Key to the parent App |
description | TEXT | Natural language description |
structure | JSON / JSONB | The compiled steps and triggers |
created_at | TIMESTAMP | Creation timestamp |
Sources: infrastructure/databases/init-databases.sh:26-34, infrastructure/databases/init-databases.sh:65-72
Step Configuration Types
Workflows support various step types, as defined in the generate_workflow_structure function:
- api_call: Interacts with external or internal endpoints.
- data_processing: Performs operations like filtering or engagement analysis.
- content_generation: Utilizes LLMs for text or image creation.
- notification: Sends alerts via email or other channels.
Sources: services/no-code-development/app.py:202-230
API Reference
The Workflow Automation system is accessible via the API Gateway.
| Endpoint | Method | Description |
|---|---|---|
/api/v1/workflow/create | POST | Generates a workflow from a description and app_id. |
/api/v1/workflow/execute | POST | Triggers the execution of a specific workflow with input data. |
/get-workflow/<id> | GET | Retrieves the full structure of a workflow. |
/list-workflows | GET | Lists workflows, optionally filtered by app_id. |
Sources: services/api-gateway/app.py:133-143, services/no-code-development/app.py:73-144
Implementation Details
The core logic for step processing is handled within the execute_workflow_steps function. It manages different logic branches for each type attribute found in the workflow structure.
# services/no-code-development/app.py:274-290
if step["type"] == "api_call":
# Simulate API call
step_result["output"] = {
"status": "completed",
"data": f"API response for {step['name']}"
}
elif step["type"] == "data_processing":
# Simulate data processing
step_result["output"] = {
"processed_data": f"Processed data for {step['name']}",
"metrics": {"records_processed": 100}
}
Sources: services/no-code-development/app.py:274-290
Deployment and Scalability
In production environments, the No-Code Development service is deployed as a Kubernetes Deployment with multiple replicas to handle concurrent workflow executions.
- Replicas: 2 (default in K8s)
- Port: 8004
- Resource Limits: 1Gi Memory, 500m CPU
- Dependencies: PostgreSQL for workflow persistence, Redis for caching.
Sources: k8s/deployment.yaml:194-218, docker-compose.yml:95-103
Conclusion
Workflow Automation in Aether-X Ultimate provides a robust mechanism for orchestrating AI-driven tasks. By transforming natural language into structured, executable steps, the system allows for the rapid development of complex integrations between microservices without manual coding, all while maintaining strict persistence and security standards through the platform's infrastructure.