How do I run a workflow to completion?
Table of Contents
The happy path configuration of the identity workflow. The ores-shell block
below is tangled into the runnable script library as identity_happy_path.ores.
1. Question
How do I run a workflow whose every step succeeds?
2. Answer
Both steps report completion, so the instance settles at completed and workflow wait says every step completed.
workflow start identity_workflow '{"steps":[{"name":"one"},{"name":"two"}]}' --instance-id 10000000-0000-4000-8000-000000000001
workflow wait 10000000-0000-4000-8000-000000000001 --timeout 60 --expect-state completed
workflow wait fails unless the instance reaches the state named, so this
script fails when the path it covers does nothing.
3. Script
projects/ores.shell/scripts/library/workflow/identity_happy_path.ores –
generated from this recipe by compass build --direct tangle_shell_scripts
(do not edit the .ores by hand).
4. Tested by
Manual: compass shell -f identity_happy_path.ores against a running fleet.
5. See also
- Add the identity workflow and the commands that drive it – the fixture.