What is a scenario?
A scenario is a visual workflow that lets you chain data-processing steps together to explore hypotheses, validate results, or run production pipelines. Each scenario is built by connecting processes (tasks and protocols) through typed ports, feeding data from one step to the next.
Scenarios are at the heart of the Constellab data lab. They support a wide range of activities — from bioinformatics protocol development and simulations to sophisticated analyses using machine learning or AI algorithms. We recommend reviewing the page about the virtual laboratory ecosystem as a prerequisite to better understand the content here.
What is a scenario template?
A scenario template is a saved workflow blueprint. It has a name, a description, and stores the structure of a protocol — its processes, connections, and configuration — but it is not a runnable object on its own. Templates let you standardize recurring workflows so every new scenario starts from the same predefined set of processes and connections.
Templates and scenarios are connected in both directions. When you create a scenario, you can start it from a template to pre-fill its workflow. Conversely, you can turn an existing scenario into a new template to capture a workflow you have already built. A template can also be added inside an existing scenario as a sub-protocol.
Key concepts
Before diving into scenarios, here are the core building blocks you will encounter:
- Process — the basic execution unit inside a scenario. A process runs a specific task (e.g. data cleaning, statistical analysis, file conversion). Each process has typed input and output ports that define what data it consumes and produces.
- Protocol — a container that groups several processes into a reusable sub-workflow. Protocols can be nested, letting you organize complex pipelines into logical blocks.
- Port — a typed connection point on a process. Input ports receive resources, and output ports emit resources. Ports enforce type compatibility so only valid connections can be made.
- Connection — a link between an output port of one process and an input port of another. Connections define the data flow through the scenario.
- Resource — any piece of data (table, file, dataset, etc.) that flows through the scenario. Resources are created by uploading files, generated by processes, or imported from other labs.
- Community agent — a pre-built, shareable process available from the Constellab Community. Agents can be added to a scenario, configured, and even edited to fit your needs.
- Scenario template — a saved workflow blueprint that can be reused to create new scenarios with a predefined structure of processes and connections.
Scenario types
Scenarios are categorized by how they were created:
- Manual — created by a user from scratch or from a template. This is the most common type.
- Auto — automatically generated by the system (e.g. as part of an import or a resource transformation).
- Imported — received from another data lab. Imported scenarios can be updated from the source lab and may show external execution statuses.
When to use templates?
Creating a scenario from a template makes sense whenever the same workflow is repeated. Consider using a template when:
- You run the same analysis repeatedly on different datasets and want every run to follow an identical, validated workflow.
- You want to standardize a workflow across a team so that every member starts from the same set of processes and connections.
- You have already built a working scenario and want to preserve its structure for future reuse without rebuilding it from scratch.
- You need to share a workflow blueprint with another data lab as a starting point.
Scenario templates vs. scenario
Scenarios and scenario templates both describe a workflow of processes and connections, but they serve different purposes. The table below summarizes the differences:
What's in this section?
This section walks you through everything related to scenarios and scenario templates:
- Scenarios page — browsing, searching, and filtering scenarios.
- Creating and configuring a scenario — creating a scenario, adding processes and resources, connecting ports, and configuring tasks and protocols.
- Scenario execution — the scenario lifecycle, running, re-running, stopping, resetting, individual process execution, and the execution queue.
- Managing a scenario — describing, linking notes, synchronizing, validating, and sharing scenarios between data labs.
- Community agents — sharing, downloading, converting, importing, and editing Community agents.
- Scenario templates page — browsing, searching, and filtering scenario templates.
- Creating and editing scenario templates — creating, updating, using, downloading, and deleting scenario templates.
- Scenario FAQ — common questions, troubleshooting, and edge cases.