forest workflow:apply
Create or update one workflow from a JSON specification of its steps. The CLI compiles the steps into a BPMN definition, uploads it to the target environment, and attaches the workflow to its collection. The rest of the layout is left untouched.Usage
Arguments
Options
When the specification comes from standard input, the CLI cannot prompt: pass
-p, -e, -t and --force.
Specification
Each step has an
id (letters, digits, _ and -, starting with a letter or _), a type, and optionally a title and a prompt (the instruction shown for the step).
auto runs the step automatically and autoComplete completes it automatically.
Create or update
The specification is the source of truth for the workflow:- With an
id, the CLI updates that workflow. Anidthat matches no workflow is an error, not a creation. - Without an
id, the CLI updates the workflow with the samenameon the samecollection, or creates one if none exists. - To change a workflow, edit the specification and apply it again. The CLI recompiles the whole definition and uploads it only if it changed. Applying an unchanged specification reports
Nothing to apply.
Example
refund-review.json
The specification describes the shape of a workflow. Settings such as the fields of a
read or update step, or the action of an action step, are not part of it yet: configure them in the workflow editor.