draft execution filter docs

This commit is contained in:
Deborah Barnard
2023-03-02 11:10:44 +00:00
parent b62f9864f7
commit 6be3ebefd7
9 changed files with 162 additions and 56 deletions

View File

@@ -0,0 +1,3 @@
3. Select either of the following options to retry the execution:
* **Retry with currently saved workflow**: Once you make changes to your workflow, you can select this option to execute the workflow with the previous execution data.
* **Retry with original workflow**: If you want to retry the execution without making changes to your workflow, you can select this option to retry the execution with the previous execution data.

View File

@@ -15,3 +15,23 @@ return [{json:{executionId}}];
The webhook URL to call to resume a [waiting](/integrations/builtin/core-nodes/n8n-nodes-base.wait/) workflow.
See the [Wait > On webhook call](/integrations/builtin/core-nodes/n8n-nodes-base.wait/#webhook-call) documentation to learn more.
## `$execution.customData`
This is only available in the Code node.
```js
// Set a single piece of custom execution data
$execution.customData.set("key", "value");
// Set the custom execution data object
$execution.customData.setAll({"key1": "value1", "key2": "value2"})
// Access the current state of the object during the execution
const customData = $execution.customData.getAll()
// Access a specific value set during this execution
const customData = $execution.customData.get("key")
```
Refer to [Custom executions data](/workflows/executions/custom-executions-data/) for more information.

View File

@@ -60,21 +60,22 @@ This includes:
* Access to n8n environment variables for self-hosted n8n.
* Metadata about workflows, executions, and nodes.
| Method | Description | Available in Code node? |
| ------ | ----------- | :-------------------------: |
| `$env` | Contains [environment variables](/hosting/environment-variables/environment-variables/). | :white_check_mark: |
| `$execution.id` | The unique ID of the current workflow execution. | :white_check_mark: |
| `$execution.mode` | Whether the execution was triggered automatically, or by manually running the workflow. Possible values are `test` and `production`. | :white_check_mark: |
| `$execution.resumeUrl` | The webhook URL to call to resume a workflow waiting at a [Wait node](/integrations/builtin/core-nodes/n8n-nodes-base.wait/). | :white_check_mark: |
| `$getWorkflowStaticData(type)` | View an [example](/code-examples/methods-variables-examples/get-workflow-static-data/). Static data isn't available when testing workflows. The workflow must be active and called by a trigger or webhook to save static data. This gives access to the static workflow data. | :white_check_mark: |
| `$itemIndex` | The index of an item in a list of items. | :x: |
| `$prevNode.name` | The name of the node that the current input came from. When using the Merge node, note that `$prevNode` always uses the first input connector. | :white_check_mark: |
| `$prevNode.outputIndex` | The index of the output connector that the current input came from. Use this when the previous node had multiple outputs (such as an If or Switch node). When using the Merge node, note that `$prevNode` always uses the first input connector. | :white_check_mark: |
| `$prevNode.runIndex` | The run of the previous node that generated the current input. When using the Merge node, note that `$prevNode` always uses the first input connector. | :white_check_mark: |
| `$runIndex` | How many times n8n has executed the current node. Zero-based (the first run is 0, the second is 1, and so on). | :white_check_mark: |
| `$workflow.active` | Whether the workflow is active (true) or not (false). | :white_check_mark: |
| `$workflow.id` | The workflow ID. | :white_check_mark: |
| `$workflow.name` | The workflow name. | :white_check_mark: |
| Method | Description | Available in Code node? | Available in expressions? |
| ------ | ----------- | :---------------------: | :-------------------------: |
| `$env` | Contains [environment variables](/hosting/environment-variables/environment-variables/). | :white_check_mark: | :white_check_mark: |
| `$execution.id` | The unique ID of the current workflow execution. | :white_check_mark: | :white_check_mark: |
| `$execution.mode` | Whether the execution was triggered automatically, or by manually running the workflow. Possible values are `test` and `production`. | :white_check_mark: | :white_check_mark: |
| `$execution.resumeUrl` | The webhook URL to call to resume a workflow waiting at a [Wait node](/integrations/builtin/core-nodes/n8n-nodes-base.wait/). | :white_check_mark: | :white_check_mark: |
| `$execution.customData` | Set and get custom execution data. Refer to [Custom executions data](/workflows/executions/custom-executions-data/) for more information. | :white_check_mark: | :x: |
| `$getWorkflowStaticData(type)` | View an [example](/code-examples/methods-variables-examples/get-workflow-static-data/). Static data isn't available when testing workflows. The workflow must be active and called by a trigger or webhook to save static data. This gives access to the static workflow data. | :white_check_mark: | :white_check_mark: |
| `$itemIndex` | The index of an item in a list of items. | :x: | :white_check_mark: |
| `$prevNode.name` | The name of the node that the current input came from. When using the Merge node, note that `$prevNode` always uses the first input connector. | :white_check_mark: | :white_check_mark: |
| `$prevNode.outputIndex` | The index of the output connector that the current input came from. Use this when the previous node had multiple outputs (such as an If or Switch node). When using the Merge node, note that `$prevNode` always uses the first input connector. | :white_check_mark: | :white_check_mark: |
| `$prevNode.runIndex` | The run of the previous node that generated the current input. When using the Merge node, note that `$prevNode` always uses the first input connector. | :white_check_mark: | :white_check_mark: |
| `$runIndex` | How many times n8n has executed the current node. Zero-based (the first run is 0, the second is 1, and so on). | :white_check_mark: | :white_check_mark: |
| `$workflow.active` | Whether the workflow is active (true) or not (false). | :white_check_mark: | :white_check_mark: |
| `$workflow.id` | The workflow ID. | :white_check_mark: | :white_check_mark: |
| `$workflow.name` | The workflow name. | :white_check_mark: | :white_check_mark: |
## Advanced

View File

@@ -1,40 +0,0 @@
---
description: An execution is a single run of a workflow.
---
# Executions
An execution is a single run of a workflow.
## Browse all executions
Select the **Executions** in the left menu to view your executions history. n8n opens the **Workflow Executions** modal. You can then open and view individual executions.
!!! note "Deleted workflows"
When you delete a workflow, n8n deletes its execution history as well. This means you can't view executions for deleted workflows.
## View executions for a single workflow
In the workflow, select the **Executions** tab in the top menu. You can preview all executions of that workflow.
## Filter the executions list
TODO
https://www.notion.so/n8n/Executions-list-improvements-a6787232db6248ac8d80dff436ee7fd3#55ee785011534424b135daa61ac3f609
## Add custom filters
TODO
https://www.notion.so/n8n/Executions-list-improvements-a6787232db6248ac8d80dff436ee7fd3?pvs=4#61dc6c39bf774abe8233145f835c4cfc
## Retry failed workflows
If your workflow execution fails, you can retry the execution. To retry a failed workflow:
1. Open the **Executions** list.
2. For the workflow execution you want to retry, select **Refresh** <span class="inline-image">![Refresh icon](/_images/common-icons/refresh.png)</span>.
3. Select either of the following options to retry the execution:
* **Retry with currently saved workflow**: Once you make changes to your workflow, you can select this option to execute the workflow with the previous execution data.
* **Retry with original workflow**: If you want to retry the execution without making changes to your workflow, you can select this option to retry the execution with the previous execution data.

View File

@@ -0,0 +1,42 @@
---
description: View and filter all executions for all workflows.
---
# All executions list
The **All executions** list shows all executions for all workflows you have access to.
!!! note "Deleted workflows"
When you delete a workflow, n8n deletes its execution history as well. This means you can't view executions for deleted workflows.
## Browse executions
Select **All executions** <span class="inline-image">![All executions menu icon](/_images/common-icons/executions-menu.png)</span> to open the list.
## Filter executions
You can filter the executions list.
!!! info "Feature availability"
Available on:
* Cloud: Start, Pro, and Power
* Self-Hosted: Team and Enterprise
1. Select **All executions** <span class="inline-image">![All executions menu icon](/_images/common-icons/executions-menu.png)</span> to open the list.
2. Select **Filters**.
3. Enter your filters. You can filter by:
* **Workflows**: choose all workflows, or a specific workflow name.
* **Status**: choose from **Failed**, **Running**, **Success**, or **Waiting**.
* **Execution start**: see executions that started in the given time.
* **Saved custom data**: this is data you create within the workflow using the Code node. Enter the key and value to filter. Refer to [Custom executions data](/workflows/execution/custom-executions-data/) for information on adding custom data.
## Retry failed workflows
If your workflow execution fails, you can retry the execution. To retry a failed workflow:
1. Select **All executions** <span class="inline-image">![All executions menu icon](/_images/common-icons/executions-menu.png)</span> to open the list.
2. On the execution you want to retry, select **Retry execution** <span class="inline-image">![Options menu icon](/_images/common-icons/three-dot-options-menu.png)</span>.
--8<-- "_snippets/workflows/executions/retry-options.md"

View File

@@ -0,0 +1,40 @@
---
description: Add custom data to your workflow executions using the Code node. You can then filter executions by this data.
---
# Custom executions data
You can set custom data on your workflow using the Code node. n8n records this with each execution. You can then use this data when filtering the executions list.
## Set custom executions data
Set a single piece of extra data:
```js
$execution.customData.set("key", "value");
```
Set all extra data. This overwrites the whole custom data object for this execution:
```js
$execution.customData.setAll({"key1": "value1", "key2": "value2"})
```
There are limitations:
* They must be strings
* `key` has a maximum length of 50 characters
* `value` has a maximum length of 255 characters
* n8n supports a maximum of 10 items of custom data
## Access the custom data object during execution
You can retrieve the custom data object, or a specific value in it, during an execution:
```js
// Access the current state of the object during the execution
const customData = $execution.customData.getAll()
// Access a specific value set during this execution
const customData = $execution.customData.get("key")
```

View File

@@ -0,0 +1,14 @@
---
description: An execution is a single run of a workflow.
---
# Executions
An execution is a single run of a workflow.
n8n provides two execution lists:
* [Workflow-level executions](/workflows/executions/single-workflows-executions/): this execution list shows the executions for a single workflow.
* [All executions](/workflows/executions/all-executions/): this list shows all executions for all your workflows.
n8n supports [adding custom data to executions](/workflows/executions/custom-executions-data/).

View File

@@ -0,0 +1,22 @@
---
description: View and filter all executions for the workflow currently open on the canvas.
---
# Workflow-level executions list
The **Executions** list in a workflow shows all executions for that workflow.
!!! note "Deleted workflows"
When you delete a workflow, n8n deletes its execution history as well. This means you can't view executions for deleted workflows.
## View executions for a single workflow
In the workflow, select the **Executions** tab in the top menu. You can preview all executions of that workflow.
## Retry failed workflows
If your workflow execution fails, you can retry the execution. To retry a failed workflow:
1. Open the **Executions** list.
2. For the workflow execution you want to retry, select **Refresh** <span class="inline-image">![Refresh icon](/_images/common-icons/refresh.png)</span>.
--8<-- "_snippets/workflows/executions/retry-options.md"

View File

@@ -117,7 +117,11 @@ nav:
- Nodes: workflows/components/nodes.md
- Connections: workflows/components/connections.md
- Sticky Notes: workflows/components/sticky-notes.md
- Executions: workflows/executions.md
- Executions:
- workflows/executions/index.md
- Workflow-level executions: workflows/executions/single-workflow-executions.md
- All executions: workflows/executions/all-executions.md
- Custom executions data: workflows/executions/custom-executions-data.md
- Tags: workflows/tags.md
- Export and import: workflows/export-import.md
- Templates: workflows/templates.md