# Build and run a workflow

> Build a repeatable analysis graph and run it against project data.

## 1. Open the workflow builder

Open a project workspace and press **+** to add an empty tab. Choose **Open workflow** to
select a saved workflow, or **New workflow** to start a draft. **Choose resource** opens the
general resource picker. You can also find saved workflows through the **Workflows** filter
in a Browser pane. Each workflow opens as a resource tab showing its name and workflow icon.
Select **Edit** to change a saved workflow, then give it a descriptive name.

Workflow tabs have their own edit mode and selected run. Save or discard changes before closing
a tab or leaving the workspace. You can keep multiple workflows open side by side.

## 2. Add and connect modules

Add modules from the available module catalog. Each module exposes typed inputs and outputs.
Connect compatible ports to define how data moves through the graph.

Choose inputs and parameters inside each module card. Connecting another card's output replaces
that input's local control; disconnecting restores it. Lock values that should be fixed for the
workflow. BisQue maintains the public workflow interface internally, without extra Input/Output
cards on the canvas.

Select one or several resources, or add repeated typed values. A single selection runs once;
multiple selections lift elementwise modules across that ordered set and produce a batch of
outputs. Other scalar parameters broadcast to each item. Scalar-only ports do not offer multiple
selection. Whole-batch modules consume the set together instead of running separately per item.
Separate batches are not automatically paired or multiplied. An image's T, Z, and channel counts
describe that one image and do not make it a batch; a JSON array is likewise one JSON value unless
you explicitly add separate values.

The editor uses the server's versioned type contract to disable incompatible connection targets
immediately. It permits the one implicit conversion from `integer` to `number`, lifts
element-by-element modules across a batch, and broadcasts scalar inputs across those items. The
server compiler repeats the complete type, lineage, required-input, and cycle checks before every
save and reports errors against the affected canvas element and port.

For a model-backed module, choose the model before choosing images. The selected immutable model
version supplies its task contract and T/Z/channel requirements, so the image picker can offer
only compatible scalar images or image collections.

In this initial release, choose images directly in the model card.
Preprocessing-module outputs cannot yet feed a model node, even when their dimensions match.
Use the processed images as resources in a subsequent model workflow. Model choices must be a
fixed node selection or a scalar workflow input. Image-producing modules' declared T/Z/channel
counts are checked against the produced image before its resource output is accepted.

## 3. Save a revision

Save the workflow when the graph is valid. BisQue creates an immutable revision so future edits
do not change the definition recorded by an existing run.

## 4. Start a run

Fill in the card controls generated from the compiled workflow inputs. Resources use resource
pickers, semantic types use the semantic-type picker, and primitive values use corresponding
typed controls with an Add button when multiple values are supported. Review the resolved module
and model versions, then choose **Run** when execution
readiness is available.

Execution availability is controlled by the deployment. If the workflow can be edited but not
run, contact the administrator or wait for a compatible execution worker to become ready.

## 5. Inspect results

The run inspector also presents any required human input without leaving the workflow tab.
It shows the run’s current state and each step's inputs and outputs. Outputs may be
BisQue resources or inline typed values. Node details retain intermediate values, lineage, and
original batch ordinals. If individual batch items fail with an expected module error, successful
ordinals continue downstream and the run is marked partial; the per-item statuses remain visible.
Open a resource input or output to inspect it in another workspace tab. Result tabs remain tied
to the run you opened, including its frozen input collections. Promote a supported output into
the project for continued work. Workflows use the workspace tabs directly; there is no separate
workflow dock layout. Batch resource viewers have Previous/Next controls; scrolling
over their navigation bar also browses the successful outputs in original ordinal order.
