Workflows
A workflow is the core building block in DotPortion.It represents how an API request is processed from start to finish using connected nodes. Instead of writing code, you design the flow visually — each node performs a single responsibility, and data flows between them automatically.
What Is a Workflow?
In DotPortion, a workflow is:- A request-driven execution graph
- Triggered by an incoming HTTP request
- Composed of connected nodes
- Executed step-by-step in a deterministic order
- Deployed as a live API endpoint
Workflow Structure
Every workflow follows the same high-level structure:- API Start Node
Defines the HTTP method and path - Processing Nodes
Handle validation, logic, database access, authentication, etc. - Response Node
Returns the final HTTP response
Example Workflow
Use case: Create a userHow Workflows Execute
When a request hits a deployed workflow:- DotPortion matches the method and path
- Execution starts at the API Start Node
- Nodes run in the order they are connected
- Each node receives:
- Input from the request
- Output from previous nodes
- Execution stops when a Response Node is reached
Data Flow Between Nodes
Data is passed between nodes as structured JSON. Each node:- Receives input
- Produces output
- Exposes its output to downstream nodes
Visual Debugging
DotPortion provides built-in debugging tools:- Step-by-step execution logs
- Node-level input and output inspection
- Clear error messages when execution fails
Deployment Model
Workflows are deployed as live APIs.- One-click deployment
- Stable endpoint URLs
- Zero infrastructure setup
- Changes require redeployment to take effect
Best Practices
- Keep workflows focused on a single responsibility
- Prefer small, composable workflows
- Validate inputs early
- Handle errors explicitly
- Use versioning instead of modifying production workflows directly
When to Use Multiple Workflows
Use separate workflows when:- Endpoints have different responsibilities
- Auth rules differ
- Response formats differ
- You want independent versioning