Martini Workflows vs Services
Overview
Martini provides two powerful tools for creating backend logic: workflows and services. Both enable you to build business processes, APIs, and integrations, but each serves different use cases and development approaches.
Prerequisites
- Martini Designer installed and running on your system
 - Basic understanding of backend development concepts
 
When to Use This
Use Workflows When You Need:
- Visual business process representation that stakeholders can easily understand and discuss
 - High-level automation sequences of complex business logic with clear data flow visualization
 - Concurrent and parallel task execution within your processes
 - Reusable business processes that can incorporate services and other workflows
 - Stakeholder collaboration on process design and validation
 
Use Services When You Need:
- Low-code logic implementation that operates below the workflow level (less visual than workflows)
 - Machine-generated components from API schemas, database operations, or external integrations
 - Fine-grained reusable functions that can be consumed by workflows
 - Atomic business operations that perform specific, focused tasks
 
Development Hierarchy
Martini offers different approaches to implementing logic, each with varying levels of user-friendliness and technical complexity:
Workflows > Services > Groovy/Java Code
- Workflows (Most User-Friendly): High-level visual automation sequences for business processes
 - Services (Moderately Technical): Low-code functions that handle specific tasks (less visual than workflows)
 - Groovy/Java Code (Most Technical): Low-level programming for complex logic
 
This is a simple way to understand what each approach offers. Workflows are the most user-friendly and visual, while Groovy/Java code is the most technical. Services sit in the middle, offering specific functionality that workflows can consume, but services cannot contain workflows.
Key Differences
Understanding when to use workflows versus services depends on your specific needs and development approach.
| Aspect | Workflows | Services | 
|---|---|---|
| Definition | High-level visual automation sequences of business processes | Low-code functions that handle specific tasks | 
| Structure | Visual nodes connected by edges showing data flow. See Parts of a Workflow | Sequential steps with less visual representation than workflows | 
| Best For | Visual business process representation and stakeholder collaboration - easier to discuss with stakeholders | Machine-generated components when consuming API and database schemas | 
| Reusability | Can contain services, workflows, and other components | Can be used by workflows; cannot contain workflows | 
| Development Style | Visual drag-and-drop with clear data flow | Low-code approach with fewer visual elements | 
| Stakeholder Friendly | Easy for non-technical stakeholders to understand | More technical, designed for developer consumption | 
| Concurrency Support | Built-in support for parallel tasks and human interaction points | Focused on atomic operations | 
| Performance Strengths | Excellent for parallel processing and concurrent task execution; built-in optimization for complex business process flows; efficient handling of human interaction points and wait states | Lightweight execution for focused, atomic operations | 
Similarities
Both workflows and services share several important characteristics:
- Backend Logic Creation: Both enable you to create sophisticated backend logic for business processes, APIs, and integrations
 - API Capability: Both can function as backend endpoints that respond to API calls or system events
 - Testing Support: Both provide built-in testing and debugging capabilities within Martini Designer
 
Workflows
Workflows are high-level visual automation sequences that represent your business processes, operating at the top of the development hierarchy. They are reusable components that excel at showing clear data flow and enabling stakeholder collaboration.
Key Concepts
For detailed understanding of workflow fundamentals, see Key Concepts.
Getting Started
To create and work with workflows:
- Practical Example with Workflow - Hands-on example of creating and using workflows in a real project to get you started quickly
 - Creating & Deleting Workflows - Follow our basic guide to create your first workflow from scratch
 
Complete Documentation
Need advanced workflow features, want to understand workflow components and structure in depth, or looking for comprehensive usage examples? See Complete Workflow Documentation.
Services
Services are low-code, reusable functions that operate at the middle level of technical complexity. While they provide visual steps, they are less visual than workflows and focus on performing specific tasks. They are often machine-generated from API schemas, database operations, or external integrations.
Key Concepts
For detailed understanding of service fundamentals, see Key Concepts.
Getting Started
To create and work with services:
- Creating Services - Follow our basic guide to create your first service from scratch
 
Complete Documentation
Need more service features, want to understand service components and structure in depth, or looking for comprehensive usage examples? See Complete Service Documentation.
Helpful Resources
- Key Concepts (Workflows)
 - Practical Example with Workflow
 - Creating & Deleting Workflows
 - Complete Workflow Documentation
 - Key Concepts (Services)
 - Creating Services
 - Complete Service Documentation
 - Community Q&A: Martini Community
Have a Question? Post or search it here.