Read and write definition contracts¶
A definition is a versioned YAML or JSON document that describes a workflow, an action, or a connector. Its contract is the set of rules that say which fields it may contain and what they mean. This page is the precise lookup for those rules: document shape, expressions, step kinds, actions, connectors, value limits, and diagnostics.
Who it is for. Integration developers who write definitions by hand and tool builders who generate them. Process designers who draw in Studio do not need it: Studio writes these documents for you, and its Source tab shows the result.
What you need. Nothing to read the reference. To run the 5-minute example, the project's Python environment from a source checkout (see Install the current source). For a guided first workflow, start with the quickstart and workflow authoring instead.
How a definition is checked¶
A definition passes four separate checks before it does real work. Each answers a different question, and passing one never implies the next:
| Question | Who checks it | Example of a failure |
|---|---|---|
| Is the document well shaped? | load_definition: required fields, step kinds, strict types |
durationSeconds: "10" is a string where an integer is required |
| Is the source valid so far? | validate_source: parsing plus checks that need no catalog |
An unsupported schema keyword or expression shape |
| Can this exact set of dependencies become executable? | compile_source: resolves an explicit catalog, checks expressions and types |
A missing action version, or a reference to an unavailable step output |
| May it run here, now? | Publication, activation, and the runtime: scoped grants, ready resources, run input | A revoked grant, an unavailable integration connection, or invalid run input |
A catalog is the explicit, immutable set of definitions and capabilities the compiler resolves references against. A workflow with no external dependencies compiles against an empty catalog. A successful compilation does not establish a worker, connection, credential, or permission; partial validation never returns an artifact, even when its checks pass.
Read the three rows from top to bottom: accepted and rejected input, reading the
whole object versus one string, and data references (ref) versus schema
references ($ref). The definition's shape and the values its schemas accept are
separate checks.
Open diagram at full size
Try the checks locally¶
This example shows that the three offline checks give three different answers for the same document. It needs no server, provider, or network.
-
Save the script. It builds a workflow that returns its string input unchanged, then loads, validates, and compiles it. Save it as
contract_checks.py:from firefly_weave.compiler.api import compile_source, validate_source from firefly_weave.compiler.catalog import CatalogSnapshot from firefly_weave.contracts.definitions import load_definition document = { "apiVersion": "weave/v1alpha1", "kind": "Workflow", "metadata": {"name": "echo", "version": "1.0.0"}, "spec": { "inputSchema": {"type": "string"}, "outputSchema": {"type": "string"}, "steps": [], "output": {"ref": "/input"}, }, } model = load_definition(document) partial = validate_source(document, format="object") compiled = compile_source( document, format="object", catalog=CatalogSnapshot.from_definitions([]) ) print(model.kind) print(partial.validation_ok, partial.partial, partial.artifact is None) print(compiled.ok, compiled.artifact is not None) -
Run it from the checkout root. Use the project environment so the import resolves to this source tree:
Expected:
The first line comes from shape validation, the second from partial validation (passed, partial, no artifact), and the third from complete compilation (passed, artifact present).
-
Read what the document says.
{"ref": "/input"}is an expression that reads the run input;{"literal": "/input"}would return that string instead.spec.outputis required even whenstepsis empty. The schema describes permitted input; it is not the input. A run of this workflow accepts"hello", while{"text": "hello"}fails runtime input validation.
If the import fails, run uv sync --locked from the checkout root, then try
again. If the output differs, compare your document with the one above field by
field: every field name is case-sensitive.
Document shape¶
Every definition has four top-level fields:
| Field | Value |
|---|---|
apiVersion |
Always weave/v1alpha1, the workflow language version |
kind |
Workflow, Action, or Connector |
metadata |
{name, version}. Names allow letters, digits, dots, underscores, and hyphens. Versions follow SemVer 2.0, including prerelease and build identifiers |
spec |
The kind-specific fields described below |
References to other definitions are exact name@version strings, such as
onboarding.check-customer@1.0.0. Unknown fields are rejected.
Wire names are camelCase. Documents use the published camelCase field names
(inputSchema, timeoutSeconds). Python model attributes are snake_case, but
snake_case keys in a document are rejected. Serialize Python models with
model_dump(by_alias=True) or model_dump_json(by_alias=True).
Some fields may be omitted but never set to null. These are the workflow's
timeoutSeconds and callable (and its allowedCallers), an action's
connection and routing, an action step's connection, and a call step's
onFailure and businessKey. When present they must have their declared type;
an explicit null is rejected. Both serializers preserve the omission, and the
Python model shows an omitted field as None.
load_definition checks shape only. It does not parse source text, validate the
embedded JSON Schemas, resolve dependencies, compile, or authorize anything. The
contracts package imports no PyFly application, provider, network, database, or
secret code.
Expressions¶
An expression computes a value from workflow data. Every expression is an object with exactly one of these keys:
| Form | Meaning | Example |
|---|---|---|
literal |
A fixed JSON value | {literal: "Ready for review"} |
ref |
A JSON Pointer (RFC 6901) into workflow data; the empty pointer reads the root | {ref: /input/customerId} |
object |
An object whose fields are expressions | {object: {customerId: {ref: /input/customerId}}} |
array |
A list whose items are expressions | {array: [{ref: /input/a}, {literal: 1}]} |
op |
An operator with expression arguments: {op: {name, args}} |
{op: {name: eq, args: [{ref: /input/urgent}, {literal: true}]}} |
Operators are eq, ne, lt, lte, gt, gte, and, or, not, exists,
coalesce, contains, notContains, in, notIn, startsWith, endsWith,
concat, and join. concat joins one or more strings, numbers, or Booleans
into one string; join takes a list of such values and a separator string. Numbers
are written as JavaScript writes them (2.0 becomes 2, 1e21 stays 1e+21).
A workflow that uses them compiles to weave/ir-v1alpha4 and lists text.concat
or text.join among its language features; decision table
rules cannot use them yet. There are no function calls, scripts, environment
variables, or file access. The compiler checks arity, types, and scope; the
compiler reference
explains evaluation rules.
In Studio, the property editor writes these same forms, which it calls Value
(literal), Data (ref), Fields (object), List (array), and
Formula (op). See
Decide where a value comes from.
An action input whose schema lists fields is edited field by field instead, with
Value, Data, or Formula on each row; Studio still stores the result
as one of these expressions (see
Map the input).
Steps¶
Every step has an id and a kind. The kind decides which other fields are
allowed. The Studio column shows the name the step picker uses; the BPMN column
helps if you know process modeling from another tool:
kind |
Studio name | Closest BPMN idea | Other fields |
|---|---|---|---|
action |
Call an action | Service task | Required uses (exact action reference) and with (input expression); optional connection slot name |
llm |
AI task | Service task | Required uses (exact AI action reference), profile (an llmProfiles entry), prompt and context expressions, and connection slot name |
transform |
Transform | Script or business rule task (expressions only) | Required value expression |
decisionTable |
Decision table | Business rule task | Required uses (exact decision table reference) and with (input expression) |
switch |
Decision | Exclusive gateway | Nonempty cases: [{when, steps, output}] and required default: {steps, output} (the Otherwise path in Studio); the first true case wins |
parallel |
Parallel | Parallel gateway (split and join) | Nonempty branches: {name: {steps, output}} and a positive integer concurrency; every branch completes before the step continues |
wait |
Wait for time | Timer intermediate event | Required positive integer durationSeconds |
signal |
Wait for signal | Message intermediate event | Required name, positive integer timeoutSeconds, and a payloadSchema object |
humanTask |
Human task | User task | Required assignment (the name of an assignment bound at activation), title and context expressions, and formSchema; decisions defaults to approve, reject (1 to 32 unique names); optional positive dueSeconds and expirySeconds |
fail |
Fail | Error end event | Required business-error code (a name such as customer-not-found) and a nonempty message |
forEach |
Loop over items | Multi-instance subprocess | Required items (an expression that gives a list) and body: {steps, output}; optional concurrency (default 1), maxItems (default 1000), and collect (all, the default, or nonNull). The defaults are written into the stored document |
callWorkflow |
Call a workflow | Call activity | Required uses (exact workflow reference) and with (input expression); optional mode (wait, the default, or detach), onFailure (stop or continue, only with wait), and businessKey expression |
transaction |
Transaction | Transaction subprocess with compensation | Required nonempty steps and output; optional businessKey expression and policy (holdSeconds, undoRetry, undoTimeoutSeconds). Each step inside it that changes data says how it is undone; see Transactions |
Weave is not a BPMN engine and does not import BPMN files. Loops, calls to other workflows, and transactions are part of the language.
New language constructs. forEach, callWorkflow, concat, and join
each need a language feature: flow.forEach, flow.callWorkflow, text.concat,
and text.join. This version compiles and runs all four; see
loops at run time and
Call another workflow. A platform that does not list
flow.forEach or flow.callWorkflow refuses to publish, import, or activate a
workflow that uses a loop or a call (WV-IR-UNSUPPORTED). A platform runs a construct only when its
language manifest lists the feature. Step IDs can never
contain [, #, or ~, which keeps
instance keys unambiguous.
Step error handling. Actions, AI tasks, transforms, decision tables, human
tasks, signals, transactions, and waiting calls accept onError: stop |
continue | errorOutput and, with errorOutput only, an errorPath block
({steps, output}). Both fields are omitted when absent, so existing documents
keep their bytes. They need the language feature flow.onError. A handled
failure is recorded as the step's error object {code, message, outcome,
attempts, instanceKey, childRunId?} (exported as step-error.schema.json) at
/steps/<id>/error; history records it as a step_failed event and a step
change with status: failed and error; IR edges gain the kind error and
joins the mode error. Incidents gain the resolution
accept_reconciled_failure (Confirm it had no effect). See
Handle step errors.
Branches may contain zero steps, but each must declare its output. The compiler,
not the shape check, enforces unique step IDs, unique signal names, branch scope,
output compatibility, and concurrency budgets.
Loop scope. Inside a forEach body, /item is the current element and
/index its position from 0; an enclosing loop's are /loops/<loop id>/item and
/loops/<loop id>/index. A body step sees what is visible at the loop plus the
earlier steps of the same iteration, and body.output also sees the last body
step. After the loop only /steps/<loop id>/output is visible: a list with one
result per element, in element order, holding at most maxItems results (with
collect: nonNull, results that are null are left out). items sees what is
visible at the loop, never the loop's own item. Loops nest at most three deep, a
body cannot wait for a signal, and all loops of a workflow together, each
multiplied by the maxItems of the loops around it, may need at most 100,000
iterations; the compiler suggests a lower maxItems for the inner loop when they
need more. The compiler reference lists
the diagnostics.
Workflow calls. A callWorkflow step names an exact published workflow
version in uses, and that version must allow the call with spec.callable:
{} allows any workflow in the project, and allowedCallers limits it to the
named workflows. with is checked against the called version's inputSchema,
and businessKey, when set, must be text of 1 to 200 characters. The step's
output depends on how it runs:
mode and onFailure |
Output |
|---|---|
wait, without onFailure or with stop |
The called version's output, checked against its outputSchema |
wait with continue |
{status, runId, output, error}: status (succeeded, failed, cancelled, or timed_out) and runId are always present; read output and error with coalesce, since either may be missing |
detach |
null; the step starts the call and continues |
A call cannot lead back to the calling version, and the longest chain of calls a
workflow starts may be at most 8 deep (max_call_depth). The compiler locks the
called version as a Workflow dependency of the caller and reads only its input
and output schemas: the called workflow's own steps, actions, and connections
stay with its own activation. The caller's artifact still includes the called
version's definition, so the dependency digest matches the published one. Each
called version is included once, without its own dependencies, and counts toward
the 32 MiB artifact limit. Anyone who can read the caller's version or export
its artifact can see the called version's steps; secret values never appear,
because literals bound to secret inputs are refused. When you activate a
workflow that calls others, workflow_activation_ids pins one activation of
each called version in the same environment, by reference (for example
{"notify-customer@1.0.0": "ACTIVATION_UUID"}). Activation refuses a missing or
extra pin, a pin to another workflow or version, a retired activation or
version, a version that does not allow this workflow, and a chain of calls
deeper than 8 with 422 WV-READINESS-CALL; the activation records each pin in
workflow_call_pins and the longest chain in call_depth.
weave definitions activations create --pin-current-calls fills the pins from the current
activation of each called version and prints them before it submits.
Calls at run time. Each call starts a separate child run of the pinned
activation, under the principal of the calling run, which must still hold
run.start when the child starts. The child has its own history, incidents,
human tasks, waits and signals, and RunView.caller names the call that started
it; GET …/runs/{id}/calls lists a run's calls with each child's run ID and
status. A waiting call continues when its child ends: with stop, a child that
fails fails the caller with the child's code and message, and a child that is
cancelled or times out opens WV-CALL-INTERRUPTED on the caller; with
continue, every outcome returns the envelope above. A call that cannot start
(the pinned activation or its version was retired, run.start was removed, or the
chain is deeper than 8) opens WV-CALL-START or WV-CALL-DEPTH on a waiting
caller and is recorded for a detached one. Cancelling or ending a caller cancels
its waiting children and theirs; detached children keep running, and a detached
call that is a workflow's last step still starts its child after the caller
finished. There is no call-level timeout: the child's own timeoutSeconds and
the caller's bound the call.
Transactions¶
A transaction step groups steps that change other systems, so that either all
of them succeed or what they did is undone. Each action or waiting
callWorkflow step inside it says how it is undone, with exactly one of:
| Choice | Fields on the step | Meaning |
|---|---|---|
| Reserve, then confirm | confirm and cancel; optional holdSeconds (30 to 86,400) |
The step holds something. Weave confirms it once the transaction goes ahead, or cancels it if anything fails first |
| An action that reverses it | compensate |
If anything later fails, Weave runs this to reverse the step |
| Can't be undone | irreversible: true |
Once this step runs the transaction can't go back, so no step that can be undone may follow it |
confirm, cancel and compensate are each {kind: action, uses, with} (with
an optional connection slot, which defaults to the step's when the undo
action needs a connection; an undo action that needs none gets no slot) or
{kind: callWorkflow, uses, with}, which always waits for its result. Their
with sees what the step saw, the step's own output, and two more roots:
/participant/operationKey (the step's operation key) and
/participant/outcome (done or unknown), and /transaction/id and
/transaction/businessKey. A cancel must work even when the reservation never
went through, so it cannot read its own step's output; a compensate reads it
as possibly missing. A transaction's policy defaults to holding reservations
for 900 seconds, retrying each undo up to 10 times (2 to 300 seconds apart), and
giving up on an undo after one day. After the step, only
/steps/<transaction id>/output is visible.
The compiler checks every path through the transaction before it publishes:
- A step that changes data and says nothing is an error
(
WV-COMP-TXN_UNDECLARED); aread_onlyaction needs no choice. - No step that can be undone may follow one that can't (
WV-COMP-TXN_ORDER, with a suggested edit that moves the step that can't be undone last), and the step that decides the transaction (the first that can't be undone) may not sit in a loop or beside parallel steps that change data (WV-COMP-TXN_PIVOT_PLACEMENT). After it, steps that can't be undone may repeat or run side by side. - After it, every action must be safe to retry (
WV-COMP-TXN_AFTER_PIVOT_UNSAFE). - Confirm, cancel and compensate actions must be
idempotentoridempotency_key(WV-COMP-TXN_UNDO_SIDE_EFFECT), and every workflow called inside a transaction must settimeoutSeconds(WV-COMP-TXN_CALL_TIMEOUT). - Reservations must be held at least as long as the step that can't be undone
may take, plus 30 seconds (
WV-COMP-TXN_HOLD_PIVOT, with the hold to set). - Transactions do not nest, a call inside one must wait for its result, and the undo fields are refused outside a transaction.
The full list, with warnings for waits that can outlast reservations and for
steps after the point of no return, is in the
compiler reference. Transactions need
the language feature flow.transaction, which this platform lists, and a
workflow that calls a workflow to undo a step pins that workflow at activation
like any call. A platform that does not list the feature refuses to publish,
import, or activate a workflow that has one (WV-IR-UNSUPPORTED). At run time,
Weave confirms reservations once the transaction goes ahead, undoes what went
through in reverse order when it doesn't, and stops behind a high-priority
incident when it can't tell what happened; see
Undo steps together with a transaction. The full example is
move-between-systems.
Human tasks need an environment assignment binding at activation, and
completing one requires the current claim and task permission. A workflow with a
human task compiles to IR version weave/ir-v1alpha2 or higher, because the
version is the highest level any construct in the workflow needs; see the
IR version rules.
Follow the human-task walkthrough before activating
one.
Retry and timeout belong to the action, not the step. In Studio,
Call an action creates an action step whose uses selects a published
action version. That action's implementation selects the worker task or
connector operation. Retry policy and action timeout are fields of the action
definition; they are not legal on a workflow step.
Workflow spec¶
| Field | Required | Meaning |
|---|---|---|
inputSchema |
Yes | JSON Schema for the run input (schema profile) |
outputSchema |
Yes | JSON Schema for the run output |
steps |
Yes | The ordered list of steps; may be empty |
output |
Yes | Expression that computes the run output |
timeoutSeconds |
No | Positive whole-run timeout; omit it for no workflow-wide timeout |
connections |
No (default {}) |
Connection slots: named requirements {connector: <exact ref>, required: <bool>}; required defaults to true. Each slot is bound to an integration connection at activation |
callable |
No | Lets other workflows call this exact version with callWorkflow: {} allows any workflow in the project, and {allowedCallers: [order-intake]} allows only the named workflows (1 to 100 unique names). Studio will write it from a Called by a workflow trigger; the manifest marks the field pending until then |
eventTrigger |
No | Lets platform events start this workflow: events (1 to 12 unique types, such as transaction.in_doubt) and an optional from list of source workflow names; a workflow reacts to its own events only when from names it. The run's input is the platform event, so set inputSchema: {$ref: weave.platform-event-v1}, a schema name the platform reserves and supplies to every compile, or a schema the event fits: one the event can't fill is WV-COMP-TYPE_MISMATCH, and one the compiler can't prove gets the warning WV-COMP-UNKNOWN_COMPATIBILITY. A catalog can't bring its own schema under that name (WV-COMP-RESERVED_SCHEMA). Needs the language feature flow.eventTrigger; bind the activation with weave triggers events create, see React to a transaction |
A callable workflow, and a loop over a list that builds text for each item:
# notify-customer@1.0.0 accepts calls from order-intake only.
spec:
callable:
allowedCallers: [order-intake]
---
# One reminder per invoice, four at a time, collected in invoice order.
- id: notify
kind: forEach
items: {ref: /input/invoices}
concurrency: 4
body:
steps:
- id: subject
kind: transform
value:
op:
name: concat
args: [{literal: "Invoice "}, {ref: /item/number}, {literal: " is overdue"}]
output: {ref: /steps/subject/output}
The full examples are in examples/language.
Actions¶
An action is a published, versioned definition of one external call. Its
spec contains:
| Field | Required | Meaning |
|---|---|---|
implementation |
Yes | Either {kind: worker, taskType, taskVersion} or {kind: connector, uses: <exact connector ref>, action: <descriptor action name>, config: {...}}; config is optional and is checked against that connector action's configSchema |
sideEffect |
Yes | read_only, idempotent, idempotency_key, or non_idempotent |
timeoutSeconds |
Yes | Positive timeout for one attempt |
inputSchema, outputSchema |
Yes | JSON Schemas for the action's input and output |
retry |
No | Defaults to maxAttempts: 1, initialDelaySeconds: 1, maxDelaySeconds: 30; attempts include the first one, and the maximum delay cannot be smaller than the initial delay |
connection |
No | The connection requirement, same shape as a workflow slot |
routing |
No | {queue} selects a named worker queue |
definiteFailures |
No | Up to 32 unique failure codes that mean nothing was applied, such as VALIDATION; a temporary code (TRANSIENT, UNAVAILABLE, RATE_LIMITED, TIMEOUT, or LLM_*) is refused (WV-COMP-ACTION_DEFINITE_TRANSIENT). Inside a transaction, a step that failed with one of these codes is not undone |
transactionAware |
No | true when a connector implementation reports explicitly that a failure applied nothing (effect: none). Ignored on worker implementations, whose release declares it on its claims |
The declared side effect governs retries. It decides whether automatic and operator retries are allowed. It does not prove that the external system really is idempotent.
Connectors¶
A connector is trusted code that knows a protocol, such as the built-in
weave-http@2.0.0. Its published manifest is a Connector definition whose
spec requires:
adapter: the installed adapter identity.configSchemaandauthSchema: what an integration connection supplies.compatibility: {apiVersion: weave/v1alpha1}.actions: a nonempty map of named action descriptors. Each requiresinputSchema,outputSchema,sideEffect, andtimeoutSeconds, may declare aconfigSchemafor the action'sconfig, and uses the same retry defaults as an action.limits: positive integersmaxRequestBytes,maxResponseBytes, andmaxTimeoutSeconds. These published I/O bounds are separate from the operator's compiler budgets.
Manifests contain no Python source or import paths. To build one, see Author a connector; to call a REST API without writing one, see Call a REST API without code.
Language manifest¶
The language manifest lists every step kind, operator, and workflow field the
language defines, the features each one needs, the features the platform runs,
and the language limits. Studio will read it to decide what to offer. Read it with
weave remote language or GET /api/v1/tenants/{tenant}/projects/{project}/language
(language.read, capability catalog.read); Studio's local host serves the same
document at /studio/contracts/language, and weave schema export writes its
schema as language-manifest.schema.json.
| Field | Meaning |
|---|---|
version, language_version |
weave/language-manifest-v1 and weave/v1alpha1 |
ir_versions |
The executable IR versions the platform accepts; weave/ir-v1alpha4 appears once the platform runs a language feature |
features |
The language features the platform runs: text.concat and text.join in this version. The capabilities response lists the same values as language_features; a platform that omits that field runs none |
limits |
max_loop_items, default_loop_max_items, max_loop_depth, max_concurrency, max_run_iterations, max_call_depth |
step_kinds, operators, workflow_fields |
One entry each, with the feature it needs (if any) and studio: ready when Studio edits it, pending until then |
Values and budgets¶
Definitions and payloads use plain JSON values: null, Boolean, integer, float, string, list, and object with string keys. Models reject:
- Infinite or NaN floats.
- Integers outside
[-9007199254740991, 9007199254740991]. - Lone Unicode surrogates, bytes, and Python-only objects.
This applies to schema and literal fields and to numeric definition fields. Models are frozen Pydantic models, but nested lists and dictionaries remain ordinary JSON containers, so immutability is shallow.
The operator's Limits() defaults bound compilation:
| Limit | Default | What it measures |
|---|---|---|
max_source_bytes / max_payload_bytes |
1,048,576 | Source and payload size in bytes |
max_steps |
1,000 | Steps in one definition |
max_depth |
32 | Nesting depth |
max_document_nodes |
100,000 | Parsed values, including the root, containers, and scalars (mapping keys excluded) |
max_expression_nodes |
10,000 | Expression nodes, counted by the compiler stage that owns expressions |
max_diagnostics |
100 | Diagnostics returned per result |
max_loop_items |
10,000 | The largest maxItems a loop may declare |
max_loop_depth |
3 | Loops nested inside one another |
max_run_iterations |
100,000 | Iterations all loops of one workflow may need, each loop multiplied by the maxItems of the loops around it |
max_call_depth |
8 | The longest chain of workflow calls one workflow may start |
Definitions cannot change these budgets. Building a model alone does not apply them; the compiler does.
Diagnostics¶
Every problem the compiler reports is a diagnostic with these fields:
| Field | Meaning |
|---|---|
code |
Stable identifier, such as WV-COMP-TYPE_MISMATCH |
severity |
error, warning, or info |
stage |
parse, schema, resolution, semantic, lowering, or evaluation |
message |
Safe, plain-language explanation; never contains submitted values |
path |
JSON Pointer into the parsed definition, such as /spec/output |
source |
Optional source range: optional file, required 1-based line and column, optional paired endLine and endColumn (the end never precedes the start) |
related |
Other locations, each with path, optional source, and optional message |
hint |
Optional next step |
suggestedEdit |
Optional {path, value} fix; since 0.1.0a7, Studio's Apply suggested edit applies it |
The compiler sorts, truncates, maps sources, and redacts diagnostics; the models
only define their shape. When the parser stops early, its result keeps the capped
diagnostics, an omitted_count of issues left out, and truncated (true when
omitted_count is greater than zero). Compiler and CLI results keep this
metadata. YAML source ranges recognize CR, LF, CRLF, NEL, line separator, and
paragraph separator as line breaks; JSON recognizes CR, LF, and CRLF only.
Packages and project checks¶
The base package contains the offline compiler and depends on no PyFly code. Optional extras add the rest:
| Extra | Adds |
|---|---|
client |
Authenticated remote CLI and SDK operations (HTTP client, credential store) |
studio |
The Studio local host |
server |
The API: PyFly web, security, relational data, PostgreSQL, OIDC, scheduling, migrations |
worker |
Remote workers: PyFly client and telemetry |
integration |
PostgreSQL, HTTP, and Kafka clients for integration tests |
kafka |
The Kafka client for broker triggers and the Kafka connector |
teams |
The Microsoft Teams provider |
openapi |
PyFly base only, for offline native OpenAPI generation |
Every extra that needs PyFly pins the published PyFly 26.9.15 wheel by direct
URL and SHA-256, and uv.lock records the artifact and its dependencies. See
runtime version and lifecycle.
contracts.openapi.create_openapi_generator returns the native OpenAPI generator
with Weave's constraint policy; base compiler and schema exports remain PyFly-free.
See native OpenAPI. Provider specifics stay outside
the contracts package.
For contributors, make check runs strict source coverage, the documentation
link and SVG checks, a strict documentation build, Ruff lint and format checks,
strict mypy, unit and contract tests, and release packaging checks. Integration
tests never skip silently: a named real-backend test fails clearly when its
backend is absent. The integration and e2e pytest markers are registered.
Next steps¶
- Author a workflow: validate, compile, and simulate the echo workflow step by step.
- Schema profile: the JSON Schema rules for
inputSchema,outputSchema,payloadSchema, andformSchema. - Compiler: results, artifacts, and how to read a diagnostic.
- Choose and configure a workflow step: the same steps as Studio presents them.
Troubleshooting¶
| What you see | Why | What to do |
|---|---|---|
| A field is rejected although it looks right | Field names are camelCase and case-sensitive; snake_case keys are rejected | Use the published name, such as timeoutSeconds |
null is rejected for an optional field |
Optional fields may be omitted but not set to null | Remove the field |
A step's retry or timeoutSeconds is rejected |
Retry and per-attempt timeout belong to the action definition | Move them to the action; use spec.timeoutSeconds for a workflow-wide timeout |
WV-COMP-UNSUPPORTED_FEATURE |
The document uses a construct whose language feature this compiler does not compile; the message names the feature | Upgrade the CLI or SDK that compiles it, or replace the construct with steps this compiler supports |
WV-IR-UNSUPPORTED when publishing a workflow with a transaction step |
The platform does not list flow.transaction (an earlier version); result.missing_features is ["flow.transaction"] |
Publish it on a platform that lists flow.transaction |
WV-COMP-TXN_UNDECLARED |
A step inside a transaction changes data and does not say how it is undone | Add confirm and cancel, compensate, or irreversible: true; Studio offers the three choices |
WV-IR-UNSUPPORTED when publishing a workflow with callWorkflow |
The platform you publish to is older and does not list flow.callWorkflow in its language manifest; result.missing_features is ["flow.callWorkflow"] |
Upgrade that platform, or keep the workflow as a draft until it lists the feature; the called workflow itself publishes normally |
WV-CALL-START or WV-CALL-DEPTH on a run |
A waiting call could not start its child: the pinned activation or its version was retired, the calling run's principal no longer holds run.start, the input no longer fits the called version, or the chain of calls is deeper than 8 |
Fix the cause, then resolve the incident with retry_safe to try a new child, accept_reconciled_result with the call's output, or terminate |
WV-CALL-INTERRUPTED on a run |
The child of a waiting call that stops on failure was cancelled or timed out | retry_safe starts a new child run; only its result is used |
WV-READINESS-CALL on activation |
A called workflow version has no pinned activation; a pin names something the workflow does not call; the pinned activation or its version is retired, runs another version, or does not allow this workflow; the pinned version differs from the one the workflow was compiled against; or the chain of calls is deeper than 8 | Pin one live activation of each called version in workflow_activation_ids |
WV-IR-UNSUPPORTED when publishing a workflow with forEach |
The platform you publish to is older and does not list flow.forEach in its language manifest; result.missing_features is ["flow.forEach"] |
Upgrade that platform, or keep the workflow as a draft until it lists the feature |
WV-DECISION-OPERATOR |
A decision table rule uses concat or join |
Build the text in a Transform step before the table and pass it in as input |
WV-IR-UNSUPPORTED on activation, a catalog read, or a run read |
The platform does not list an IR version or a language feature the workflow uses; result.missing_features names the missing features and is empty when the IR version itself is unknown. A catalog list shows such a version as an unavailable item with reason: ir_unsupported and the same missing_features. A run that uses such a feature waits for an upgrade; signals and task results for it answer the same way, and run lists show it as unavailable |
Upgrade the platform, or activate a version that does not use the feature |
onFailure is rejected on a call step |
onFailure applies only when the call waits for its result |
Remove onFailure, or set mode: wait |
| Partial validation passes, but there is no artifact | Partial validation never produces one | Compile with an explicit catalog |
| Compilation passes, but the run fails to start | Compilation proves no worker, connection, or permission | Check the activation's bindings and your grants |