> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pnbr.io/llms.txt
> Use this file to discover all available pages before exploring further.

# A run cannot start because the workflow has no published version

> A run starts from a published version. A draft is not run, and a start with no published version is refused until the workflow is published.

Troubleshooting · workflows

> **Use when**
>
> "`penumbra workflows run <workflow>` is refused with `workflow_not_published`, or with `workflow_version_not_found` for a version number."

> **Looking for something else?**
>
> A draft with problems that a publish refuses (problems workflow-unhandled-outcome and workflow-step-unavailable). A person who cannot start a run (card rule workflow\.12).

## Signs

* `penumbra workflows run <workflow>` is refused with `workflow_not_published`
  and the message "This workflow has no published version to run."
* `penumbra workflows show <workflow>` prints `published: not yet`.
* `penumbra workflows run <workflow> --version 3` is refused with
  `workflow_version_not_found`, because the workflow has only versions 1 and 2.

## Why it happens

A run is of one numbered version, and a version never changes. A draft changes
while the person edits it, so it is never run. A workflow that was saved but not
published has no version to run.

## What Penumbra does

By itself:

* Refuses the start before it plans or writes anything, so no run and no credit
  is left behind.
* Runs the newest published version when the start names no version.
* Keeps every published version, so a start can name an earlier one.

You must:

* Check the draft until it has no problem, then publish it.
* Plan the new version, and show the person its cost before you ask them to
  start a run.

Not handled:

* Penumbra does not publish a draft for the person when a start is refused.

## Do

1. Run `penumbra workflows show <workflow>` and read the problems and the
   published line.
2. If the draft has problems, fix them (problems [workflow-unhandled-outcome](https://docs.pnbr.io/troubleshooting/workflow-unhandled-outcome.md)
   and [workflow-step-unavailable](https://docs.pnbr.io/troubleshooting/workflow-step-unavailable.md)), check again, and update the draft.
3. Run `penumbra workflows publish <workflow>`, then `penumbra workflows plan <workflow>`, and give the person the cost.
4. Start the run again with the same inputs and a new `--request-id`.

## Don't

* Don't copy the draft into another workflow to get a version. That makes a
  second job to keep in step with the first.
* Don't publish a draft without the person's agreement because a start was
  refused.

## Check

* `penumbra workflows show <workflow>` prints the published version.
* The start now answers a run id and the status `pending`.

## Related

Card [workflow](https://docs.pnbr.io/concepts/workflow.md), with rules [workflow.7](https://docs.pnbr.io/concepts/workflow.md#rule-workflow-7) and [workflow.12](https://docs.pnbr.io/concepts/workflow.md#rule-workflow-12). Recipe
[automate-a-job](https://docs.pnbr.io/guides/automate-a-job.md).

## Keep going

[Workflow](https://docs.pnbr.io/concepts/workflow.md) · [Write a job as a workflow](https://docs.pnbr.io/guides/automate-a-job.md) · [A step can end in a way the workflow does not handle](https://docs.pnbr.io/troubleshooting/workflow-unhandled-outcome.md) · [A step names an operation this project cannot use](https://docs.pnbr.io/troubleshooting/workflow-step-unavailable.md)

Penumbra Grammar 0.6.26


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.