# Test and publish

Source: https://openflow.run/en/docs/guides/test-and-publish/
Language: en
Product version: 0.1.0-beta.77

Check a Draft, inspect a Run, and activate a fixed production version.

A Draft is editable. Production execution uses the current Live publication. Testing and publication make different checks, so use the result of each operation to decide what is ready.

## Validate the graph

Run the workflow check to find missing bindings, invalid schemas, unavailable outputs, and other graph diagnostics. A valid graph establishes deterministic compatibility with the selected Engine Contract. It does not prove that an external account, model service, or callback endpoint is ready.

Full checks and publication validate the complete graph. A Draft Run validates the scope reachable from its selected Trigger and its dependencies; an unrelated incomplete branch need not prevent that test.

## Test one entry

Select the Trigger to test and supply representative inputs. Inspect the resulting Run, including selected branches, node inputs, business outputs, pending Waits, and failures.

Approval releases either the approved reply or the revision branch after a human decision.

**Input**
The proposed reply is "Your replacement is ready to ship."

**Expected result**
Approve continues to Approved reply; reject continues to Keep the draft.

**Before running**
An Open Flow deployment is needed to execute or import this example. The preview itself runs offline.

[Download workflow](https://openflow.run/docs/examples/approval-review.openflow.json)

The approval example demonstrates a branch that remains blocked until a human decides. The preview does not submit a decision. In an actual Run, approve or reject its pending Approval through an authorized Run interface.

## Publish a version

Publication can prepare external resources, such as Trigger subscriptions. Only a fully successful publication switches Live and activates its bindings. Preparation failure leaves the previous Live version in place.

Draft edits made afterward affect future Draft tests. They do not change the fixed Revision, permissions, or inputs of an already accepted Run.

## Enable automatic execution

Publish and enable the Flow, then verify the actual automatic entry: a scheduled occurrence, HTTP request, poll result, or provider event. Disabling the Flow blocks new production admission; it does not cancel accepted Runs.

Explicit Live Run calls use a Start entry. Other Triggers admit Live Runs through their managed mechanisms. Draft tests can simulate any Trigger.

## Inspect failures before retrying

A failed Task may already have caused an external operation. An `indeterminate` outcome means that execution could not be confirmed. Check the external system before repeating the work.

Rollback creates a new publication pointing to an earlier definition. It does not undo external side effects or rewrite completed Runs. See [errors and retries](https://openflow.run/en/docs/concepts/errors-and-retries/index.md).

## Sources

*   [docs/architecture.md](https://github.com/oomol-lab/open-flow/blob/e25a738d170322734572a0b8a1323cb00b9d355a/docs/architecture.md#3-execution-publication-and-lifecycle)
*   [docs/control/contracts/control-api.md](https://github.com/oomol-lab/open-flow/blob/e25a738d170322734572a0b8a1323cb00b9d355a/docs/control/contracts/control-api.md#4-validation-publication-and-live)
