diff --git a/packages/cli/README.md b/packages/cli/README.md index f54728a5b..b709d3106 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -261,30 +261,28 @@ To see an example workflow, run the test command with `openfn test`. A workflow has a structure like this (better documentation is coming soon): -``` - -{ -"start": "a", // optionally specify the start node (defaults to jobs[0]) -"jobs": [ +```json { -"id": "a", -"expression": "fn((state) => state)", // code or a path -"adaptor": "@openfn/language-common@1.75", // specifiy the adaptor to use (version optional) -"data": {}, // optionally pre-populate the data object (this will be overriden by keys in in previous state) -"configuration": {}, // Use this to pass credentials -"next": { -// This object defines which jobs to call next -// All edges returning true will run -// If there are no next edges, the workflow will end -"b": true, -"c": { -"condition": "!state.error" // Not that this is an expression, not a function + "start": "a", // optionally specify the start node (defaults to jobs[0]) + "jobs": [ + { + "id": "a", + "expression": "fn((state) => state)", // code or a path + "adaptor": "@openfn/language-common@1.75", // specifiy the adaptor to use (version optional) + "data": {}, // optionally pre-populate the data object (this will be overriden by keys in in previous state) + "configuration": {}, // Use this to pass credentials + "next": { + // This object defines which jobs to call next + // All edges returning true will run + // If there are no next edges, the workflow will end + "b": true, + "c": { + "condition": "!state.error" // Not that this is an expression, not a function + } + } + } + ] } -} -}, -] -} - ``` ## Compilation