Guide · workflows
Use when
The person wants a job written as steps with its cost known first, such as reading new Files and extracting what they say. They may then want it run.
Looking for something else?
A one-time extraction or crawl, which you run directly (recipe Extract entities from Files). Changing a Shape (recipe Change a Shape and publish it).
Outcome
A published version of the workflow, with a plan the person has read. When the person agrees, it also has a run that you have followed to its end. The person knows each step’s cost, which steps have no figure, and that the version runs nothing until they start a run.Before you start
- Know the job in the person’s words: what starts it, what it reads, what it makes and who hears about it.
- Know which Shape and which collection it uses. Ask if you are not sure.
- Check what you may do. A project editor, admin or owner changes workflows, and
a key needs
workflows.write(card rule workflow.10).
Steps
- Read the steps you can use:
penumbra workflows catalog. Read one withpenumbra workflows catalog --step <operation>. - Write the workflow file. Give each step only the inputs it needs, and route every outcome the catalog lists for it (card rules workflow.2 and workflow.3).
- Check it:
penumbra workflows check --file workflow.json. Fix each problem it prints, then check again. Checking is free. - Save it:
penumbra workflows create --file workflow.json. Later edits usepenumbra workflows update <workflow> --file workflow.json. - Publish it:
penumbra workflows publish <workflow>. A draft with problems is refused, and the problems are listed. - Plan it:
penumbra workflows plan <workflow>. Planning is free. - Tell the person the cost of a run and the most a month can cost. Say which steps have no figure and why. Say that the version does nothing by itself. Wait for a clear yes before you go on to anything that spends.
- Only when the person says yes, ask them to start the run, or start it as them
when they have signed in:
penumbra workflows run <workflow> --input name=value. Add--watchto follow it. A run needs a signed-in person; a key is refused (card rule workflow.12). - Follow it:
penumbra workflows runs get <run>shows the status, the charge and every attempt. Stop it withpenumbra workflows runs cancel <run>if the person asks (card rule workflow.14).
Check
penumbra workflows show <workflow>showsproblems: noneand the published version.- The plan lists every step. Each step with
paidin its effects has a figure or anot_estimatedbasis that you have explained. - The digest you give is the digest of the plan you ran last.
- After a run,
penumbra workflows runs get <run>shows a status that is notpendingorrunning, and a charge that you have told the person.
If it goes wrong
Worth offering
- A paid step may have no figure because its scope comes from another step. Offer to read the extraction plan for a sample of the Files first (recipe extract-files).
- Offer to read the plan together, step by step, before the person decides.