Skip to main content
Version: 3.0.0

Submissions

A submission is a request to the runtime to run a workflow. Almost every submission is the simple one: run this workflow, once, now.

Submit one workflow​

orca run my_assay --run-mode CHECK_RUN --vars plate_count=2 --wait

orca run takes the name of a workflow in the mounted package. Without --wait it returns as soon as the run is accepted and prints the execution id, which every other command keys on.

That one command creates a fresh execution with one labware group: one of each labware thread the workflow starts, so a workflow with a sample plate thread and a tip rack thread runs one of each.

--vars overrides variable values for this run only, leaving the workflow's defaults alone. See Variables.

--wait holds until the run ends and reports its end state. A run that paused for an operator and was never answered does not come back completed. To watch a run as it goes, see Events and CLI: monitor.

The same submission over REST and from Python:

curl -X POST http://127.0.0.1:8765/api/executions \
-H "Content-Type: application/json" \
-d '{"workflow_name": "my_assay", "run_mode": "CHECK_RUN", "variables": {"plate_count": 2}}'
from orca.sdk.client import DaemonLoadingClient

client = DaemonLoadingClient("http://127.0.0.1:8765")
run = client.submit_workflow("my_assay", {"plate_count": 2}, run_mode="CHECK_RUN")

The response carries execution_id, run_mode, group_count, batch_mode, submitted_at, sim_speedup and unsettled.

Run modes​

A run mode is required on every submission. There is no default.

ModeWhat it doesUse it for
CHECK_RUNEvery device runs its simulator inside Orca. Nothing waits. Works on a copy of the plate record.Checking that a workflow builds and runs to the end.
SIMEvery device runs its simulator on its orca-client. Steps wait, sped up.Watching a run unfold, and testing the whole path without moving hardware.
LIVEEach device runs as its own sim or live setting.Real runs, and bringing a lab up one instrument at a time.

Only one run mode is active at a time. A run in a different mode from a run still going is refused with other_run_mode_active. A SIM or LIVE run is refused with devices_not_ready when a device or its orca-client is not up. See Run modes.

A SIM run goes 100 times faster than real time unless you say otherwise: --sim-speedup 10, or "sim_speedup": 10 in the REST body. See Simulated speed.

What a submission can carry​

Field (REST)CLIMeaning
workflow_namepositionalThe workflow to run.
run_mode--run-modeCHECK_RUN, SIM or LIVE. Required.
variables--varsVariable values for this run.
groups--groups-file, --groups-jsonLabware groups. orca submission submit only.
batch_mode--batch-modeSTANDALONE (default) or JOIN_EXISTING. orca submission submit only.
deployment_profile--profileThe name of a saved profile to load.
sim_speedup--sim-speedupSpeed of a SIM run.
operator_id--operator-idWho submitted it.

An unknown field is refused.

Labware groups​

A labware group is a bundle of labware that moves through a workflow together: one sample plate plus the tip rack that serves it, for example. orca run always runs a single default group. To submit several, use orca submission submit with a groups file:

[
{"id": "g1", "members": [{"thread_template_name": "plate_thread", "acquisition": {"kind": "pool"}}]},
{"id": "g2", "members": [{"thread_template_name": "plate_thread", "acquisition": {"kind": "pool"}}]}
]
orca submission submit my_assay --run-mode CHECK_RUN --groups-file groups.json

Over REST the same list is the groups field of POST /api/executions.

Each group spawns its own copy of every required thread. A group id must not contain :, and a group may carry at most one member per thread template.

thread_template_name matches either the @orca.thread-decorated function's name or the labware template's name. See Labware threads. A group missing a member for a required entry thread is refused at submit time, as is a member naming a template the workflow does not register.

Where a group's labware comes from​

Each member carries an acquisition that says how the engine gets hold of the physical labware:

kindFieldsMeaning
pool (default)noneTake a new instance, the way the thread's start says.
barcodebarcodeUse the registered labware with this barcode, looked up at submit time. An unknown barcode is refused.
locationsource_locationStart from this position. It overrides the thread's own start location for this group.
{"thread_template_name": "plate_thread", "acquisition": {"kind": "location", "source_location": "hotel_1/shelf_3"}}

verify_barcode on a location acquisition is refused: nothing reads a barcode when the labware is picked up, so it could not be checked. To take a labware by its barcode, use kind: "barcode".

The runtime refuses the submission if any entry thread's start location is already occupied.

Naming a partner labware​

Some steps need two pieces of labware, such as a sample plate and the index plate it is tagged from. By default the partner is whichever labware its thread is carrying, or a new one. When a group must use one particular partner, name it by barcode. A member on the partner's thread with a barcode acquisition does that:

{
"id": "g1",
"members": [
{"thread_template_name": "sample", "acquisition": {"kind": "barcode", "barcode": "S-1"}},
{"thread_template_name": "index", "acquisition": {"kind": "barcode", "barcode": "IDX-7"}}
]
}
  • The group's steps run only with the labware that barcode belongs to. No other labware stands in for it.
  • That labware is taken from where it stands. Labware that is registered but not on the deck starts at the partner thread's start.
  • If the named labware cannot serve, because the barcode is unknown, the labware is in use by another run, or it is used up, the thread pauses and says why. Fix it and retry.
  • A partner every group shares (SHARED_ACROSS_GROUPS, BATCHABLE, or a REUSE_EXISTING resident) cannot be named by one group. The submission is refused.
  • Only a barcode acquisition names a partner. A location acquisition on a partner thread is accepted and has no effect.

A workflow can name the partner itself with ctx.set_partner_constraint. See Labware threads.

Sharing labware across groups​

A labware template can be flagged SHARED_ACROSS_GROUPS so all groups in a submission converge on the same physical instance, which is how several sample plates end up pooled into one final plate:

from orca.sdk.labware import GroupSharing, PlateTemplate

final_plate = PlateTemplate(
"final_plate",
"Cor_96_wellplate_360ul_Fb",
group_sharing=GroupSharing.SHARED_ACROSS_GROUPS,
)

Two independent flags on a labware template control sharing, both defaulting to the isolated value:

FlagValuesEffect
group_sharingGroupSharing.PER_GROUP (default) / SHARED_ACROSS_GROUPSWithin one submission: each group gets its own instance, or all groups share one.
submission_batchingSubmissionBatching.ISOLATED (default) / BATCHABLEAcross submissions: whether a later JOIN_EXISTING submission may join an in-flight receiver.

Both are silent no-ops in the default single-group, STANDALONE shape. The behavior only activates when the submission opts in: several groups for SHARED_ACROSS_GROUPS, --batch-mode JOIN_EXISTING for BATCHABLE.

Joining a run already in flight​

By default, each submission creates a fresh execution. Pass --batch-mode JOIN_EXISTING (REST: "batch_mode": "JOIN_EXISTING") to merge into a still-accepting execution of the same workflow:

orca submission submit my_assay --run-mode SIM --groups-file more.json --batch-mode JOIN_EXISTING

This is how staged submissions work: start a long multi-plate assay and add more plates to it as samples arrive over hours.

The runtime looks for a live execution of that workflow whose phase is ACCEPTING, and adds your groups to it. It refuses the join in four cases:

  • The execution is DRAINING (someone closed it). Resubmit as STANDALONE to start a new execution.
  • The execution is paused. A paused execution stays ACCEPTING, but its pause gates new work, so the join is refused, not queued behind the pause.
  • The execution holds a quarantined slot from an ORPHANED_BACKLOG.
  • The run modes differ. One execution has one run mode.

With no live execution for this workflow at all, JOIN_EXISTING starts a fresh one, exactly like STANDALONE.

STANDALONE never joins, and that can leave you with two executions​

STANDALONE always starts a fresh execution, even when an ACCEPTING execution for the same workflow is alive.

Submit STANDALONE against a workflow whose existing execution is DRAINING and you get two executions of that workflow: the draining one runs its threads to completion while the new one starts. Later JOIN_EXISTING submissions go to the new one. Both use lab resources until the draining one finishes. To avoid the overlap, wait for the draining execution to end before you submit.

Execution phases​

PhaseMeaning
ACCEPTINGRunning and open to grouped JOIN_EXISTING submissions.
DRAININGThe execution was closed. New joins refused; live threads continue.
STOPPINGAn abort was issued. Threads are unwinding. Not terminal.
COMPLETED / PARTIAL_COMPLETED / FAILED / ABORTEDTerminal. PARTIAL_COMPLETED: at least one thread completed and at least one was aborted.

Closing an execution​

To stop an execution from accepting new submissions but let its threads finish:

orca execution close <execution_id>

REST: POST /api/executions/{execution_id}/close. Closing an execution that is already draining or finished changes nothing.

Stopping an execution​

The operator stop is a two-call confirmed abort:

orca execution stop <execution_id>             # call 1: pause, and arm the abort
orca execution stop <execution_id> --confirm # call 2: abort

Call 1 pauses the execution at once and arms the abort. Nothing has been aborted, and orca execution resume disarms it. Call 2, on an armed and still-paused execution, runs the abort and waits for the execution to end.

Two separate calls are always required. A confirmed call that arrives while nothing is armed only arms. REST: POST /api/executions/{execution_id}/stop, then again with {"confirm": true}.

If you want the run to survive instead, pause it and answer the incident: see Recovery.

How the terminal phase is decided​

When an execution's threads all reach a terminal state, the runtime rolls the execution up to a single terminal phase:

  • COMPLETED only if every thread completed.
  • FAILED if the execution task raised, or if any thread ended in the crash-only FAILED status (a thread whose task died on an unhandled error). FAILED takes precedence over every other outcome.
  • ABORTED if the run was stopped, or if no thread completed. A clean task return is not enough on its own: ABORT_THREAD and a cooperative stop both return without raising.
  • PARTIAL_COMPLETED if the operator aborted some threads with ABORT_THREAD and at least one other thread completed.

What nobody has settled​

The submit response carries an unsettled list: everything the record cannot answer right now, as of this submission. It is reported, never refused. Committing a deck to a run is the one moment an operator is certainly paying attention, and the same list read any other way needs somebody to think of asking for it. Empty is the ordinary case.

Each entry names the subject, why it is unsettled, and the verb that settles it. That verb can be null, which means no verb settles it yet: an unfinished action is holding operations nobody has folded.

If the read itself fails, the submission still succeeds and the list comes back empty. A report about work never refuses the work. See Runtime state.

See also​

  • Runtime: the service that accepts submissions and runs them.
  • Run modes: the three run modes, and the per-device sim or live setting.
  • Workflows: what you are submitting, and how threads compose into one.
  • Recovery: what happens when a submitted execution hits an incident.
  • CLI: run a workflow: the same submissions from a terminal.