diff --git a/docs/index.rst b/docs/index.rst index d90ce4ff4..f75fc4560 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -82,4 +82,5 @@ Kendraio App .. toctree:: :maxdepth: 2 :caption: Automated testing + testing/tips \ No newline at end of file diff --git a/docs/requirements.txt b/docs/requirements.txt index 302768159..c5744ea2f 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,3 @@ sphinx-prompt docutils<0.18 +sphinx_rtd_theme diff --git a/docs/workflow/blocks/launch_block.rst b/docs/workflow/blocks/launch_block.rst index 040ac145d..8c6666e89 100644 --- a/docs/workflow/blocks/launch_block.rst +++ b/docs/workflow/blocks/launch_block.rst @@ -18,11 +18,13 @@ Supported properties -------------------- - **adapter** - The adapter of the flow to launch -- **workflowId** - The workflow to launch +- **workflowId** - The flow to launch - **valueGetters** - An onbject containing JMESPath to evaluate for adapter and workflowId. +- **context** - Data that will be passed to the flow to launch Dynamic config -------------- + .. code-block:: json { @@ -33,6 +35,20 @@ Dynamic config } } +With context +------------ + +.. code-block:: json + + { + "type": "launch", + "adapter": "schemas", + "workflowId": "edit", + "context": { + "id": "data.uuid" + } + } + diff --git a/docs/workflow/blocks/mapping.rst b/docs/workflow/blocks/mapping.rst index 11e2dd600..d595408b7 100644 --- a/docs/workflow/blocks/mapping.rst +++ b/docs/workflow/blocks/mapping.rst @@ -54,15 +54,19 @@ Handy JMESPath patterns ----------------------- Using a string as a value -^^^^^^^^^^^^^^^^^^^^^^^^^ +------------------------- + + To be valid JMESPath, keys and values must be wrapped in double quotes. -For a hardcoded string, the value must be wrapped in backticks, otherwise it will result `null` for undefined variables. +A hardcoded string's value must be wrapped in backticks, otherwise it will result in `null` for undefined variables. + .. code-block:: json - { - "name": `John`, - "surname": `Doe`, - "iAmNull": "not showing" - } + + { + "name": `John`, + "surname": `Doe`, + "iAmNull": "not showing" + } Output will be: @@ -72,19 +76,19 @@ Output will be: surname: "Doe" iAmNull: null -We've seen that property values of object keys can be set using backticks, and it is also possible to wrap a whole JSON object in backticks. -The output will be the same as this: +It is also possible to wrap a whole JSON object in backticks: .. code-block:: json - `{ - "name": "John", - "surname": "Doe", - "iAmNotNull": "now this value is visible too" - }` + + `{ + "name": "John", + "surname": "Doe", + "iAmNotNull": "now this value is visible too" + }` Not -^^^ +--- When your data structuture holds the value that you wish to negate, you need to enclose the path of your data in parentheses before you NOT it. @@ -110,15 +114,17 @@ If you want to combine a NOT statement like this with additional logic, you need Default values -^^^^^^^^^^^^^^^ +-------------- Set default values by using "||" (or) -- value || '[default]' +.. code-block:: text + + data || {} Filtering data -^^^^^^^^^^^^^^ +-------------- Filter by the existence of a flag @@ -216,7 +222,7 @@ And this version will return an array of objects Merging two arrays -^^^^^^^^^^^^^^^^^^^ +------------------ If you have two arrays, and want to combine them, you can use the flatten operator "[]". For example, if you want to combine information from a form with data you've previously saved to context, you can merge the two arrays like this. @@ -227,7 +233,7 @@ For example, if you want to combine information from a form with data you've pre Creating an object from two arrays - spreadsheet import -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +------------------------------------------------------- To import from a spreadsheet, converting each row into an object with keys in the first row, you need a combination of actions. @@ -247,7 +253,7 @@ you need a combination of actions. Kendraio Mapping extensions ----------------------------- +--------------------------- Kendraio is using a version of JMESPath that supports extensions to provide additional functionality. You can find these in our repository: @@ -266,7 +272,7 @@ These extensions are a set of additional functions that complement the standard } Available Extensions ---------------------- +-------------------- 1. get 2. set