From 253978b8dff5bf6c75fa23a108cfa69014bfe21c Mon Sep 17 00:00:00 2001 From: QuantumGhost Date: Thu, 29 May 2025 02:21:46 +0800 Subject: [PATCH] docs(api): Update docs for `extract_variable_selector_to_variable_mapping` --- api/core/workflow/nodes/base/node.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/api/core/workflow/nodes/base/node.py b/api/core/workflow/nodes/base/node.py index 81aa669381..75ead5a6cc 100644 --- a/api/core/workflow/nodes/base/node.py +++ b/api/core/workflow/nodes/base/node.py @@ -99,6 +99,16 @@ class BaseNode(Generic[GenericNodeData]): {'1747829548239.#1747829667553.result#': ['1747829667553', 'result']} + For loop and iteration nodes, the mapping may look like this: + + { + "1748332301644.input_selector": ["1748332363630", "result"], + "1748332325079.1748332325079.#sys.workflow_id#": ["sys", "workflow_id"], + } + + where `1748332301644` is the ID of the loop / iteration node, + and `1748332325079` is the ID of the node inside the loop or iteration node. + Here, the key consists of two parts: the current node ID (provided as the `node_id` parameter to `_extract_variable_selector_to_variable_mapping`) and the variable selector, enclosed in `#` symbols. These two parts are separated by a dot (`.`).