# FlowDrop Pipeline

> Content entity for workflow execution orchestration — grouping jobs, tracking progress, and providing the execution container for workflow runs.

## Overview

The `flowdrop_pipeline` module provides the execution container for workflow runs. A pipeline represents a single execution of a workflow, grouping all the individual [jobs](flowdrop_job.md) (one per node) together for coordinated execution, status tracking, and progress monitoring.

The module includes a job generation service that takes a workflow definition and creates the corresponding job entities with their dependency relationships. Pipelines are then executed by one of the [flowdrop_runtime](flowdrop_runtime.md) orchestrators.

## Dependencies

- [flowdrop_job](flowdrop_job.md) (job entities for node execution)
- [flowdrop_workflow](flowdrop_workflow.md) (workflow definitions)

## Configuration

### Admin Pages

| Path | Description |
|------|-------------|
| `/admin/flowdrop/pipelines` | List all pipelines |
| `/admin/flowdrop/pipelines/{id}` | View pipeline details and status |
| `/admin/flowdrop/pipelines/{id}/jobs` | List jobs within a pipeline |
| `/admin/flowdrop/pipelines/{id}/generate-jobs` | Generate jobs from the workflow definition |
| `/admin/flowdrop/pipelines/{id}/clear-jobs` | Clear all jobs in a pipeline |
| `/admin/flowdrop/workflows/{workflow_id}/pipelines` | List pipelines for a specific workflow |
| `/admin/flowdrop/structure/pipeline-types` | Manage pipeline type bundles |
| `/admin/flowdrop/structure/pipeline-types/add` | Add a pipeline type |
| `/admin/flowdrop/structure/pipeline-types/{id}` | Edit a pipeline type |

### Permissions

| Permission | Description |
|------------|-------------|
| `administer flowdrop_pipeline types` | Manage pipeline type bundles. Restricted. |
| `view flowdrop_pipeline` | View pipeline entities |
| `create flowdrop_pipeline` | Create pipeline entities |
| `edit flowdrop_pipeline` | Edit pipeline entities |
| `delete flowdrop_pipeline` | Delete pipeline entities |

## Tips and Tricks

### Pipeline vs WorkflowSnapshot

FlowDrop uses two complementary tracking systems:

- **Pipeline + Jobs** — User-facing progress tracking. Individual content entities per node execution, suitable for admin UI and queue management.
- **WorkflowSnapshot** — Internal state serialization. A single entity capturing the complete execution state, used for orchestrator handover and resumption.

Both systems work together during execution. See the [Workflow Snapshots](../development/workflow-snapshots-and-orchestrators.md) documentation for details.

### Viewing Execution Progress

Navigate to `/admin/flowdrop/pipelines/{id}/jobs` to see real-time execution progress. Each job shows its status, and you can drill into individual jobs to inspect input/output data.

## Developer API

> All PHP classes in this module are `@internal` and not part of the stable public API. They may change without notice in any release. See the [BC Policy](../reference/api/bc-policy.md) for details.

### Services

| Service ID | Class | Description |
|-----------|-------|-------------|
| `flowdrop_pipeline.job_generation` | `JobGenerationService` | Generates job entities from a workflow definition, establishing execution dependencies |

### Entities

#### FlowDropPipeline (Content Entity)

A bundled content entity representing a single workflow execution.

#### FlowDropPipelineType (Config Entity)

Bundle type for pipelines.

### API Endpoints

| Method | Path | Description |
|--------|------|-------------|
| GET | `/api/flowdrop/workflow/{workflow_id}/pipelines` | List pipelines for a workflow |
| GET | `/api/flowdrop/pipeline/{pipeline_id}` | Get pipeline details |
| GET | `/api/flowdrop/pipeline/{pipeline_id}/status` | Get execution status |
| GET | `/api/flowdrop/pipeline/{pipeline_id}/logs` | Get execution logs |

## References

- [flowdrop_job](flowdrop_job.md) — individual job entities within a pipeline
- [flowdrop_runtime](flowdrop_runtime.md) — executes pipelines
- [flowdrop_workflow](flowdrop_workflow.md) — workflow definitions that pipelines are created from
- [Workflow Snapshots and Orchestrators](../development/workflow-snapshots-and-orchestrators.md)
