# Business Workflows

{% hint style="info" %}
Works with: **Laravel**, **Symfony**, and **Standalone PHP**
{% endhint %}

## The Problem

Your order fulfillment process spans 6 steps across 4 services. The logic is spread across event listeners, cron jobs, and status flags. Nobody can explain the full flow without reading all the code. Adding or reordering steps risks breaking the entire process.

## How Ecotone Solves It

Ecotone provides three workflow approaches — from simple handler chaining to stateful sagas to declarative orchestrators. Each step is independently testable. The workflow definition lives in one place, not scattered across the codebase.

***

Ecotone provides three different ways to build Workflows:

### 🔄 **Use** [**Handler Chaining**](/modelling/business-workflows/connecting-handlers-with-channels.md) **when:**

* You have simple, linear workflows
* Steps are tightly coupled to specific workflows
* You don't need dynamic workflow construction

### 📊 **Use** [**Sagas**](/modelling/business-workflows/sagas.md) **when:**

* You need to **remember state** between steps
* Workflows span **long periods** (hours, days, weeks)
* You need **compensation logic** for failures
* Workflows involve **human interaction** or external approvals

### ✅ **Use** [**Orchestrator**](/modelling/business-workflows/orchestrators.md) **when:**

* You have **predefined workflows** with clear steps
* Steps need to be **reusable** across different workflows
* You need **dynamic workflow construction**
* Workflow logic is **separate from step implementation**

## Materials

### Links

* [Building workflows in PHP using Orchestrator](https://blog.ecotone.tech/building-workflows-in-php/) \[Article]
* [Building workflows in PHP with pipe and filter architecture](https://blog.ecotone.tech/building-workflows-in-php-with-ecotone/) \[Article]


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ecotone.tech/modelling/business-workflows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
