| from collections.abc import Mapping, Sequence | |||||
| from typing import Any | |||||
| from core.workflow.entities.node_entities import NodeRunResult | from core.workflow.entities.node_entities import NodeRunResult | ||||
| from core.workflow.nodes.base import BaseNode | from core.workflow.nodes.base import BaseNode | ||||
| from core.workflow.nodes.end.entities import EndNodeData | from core.workflow.nodes.end.entities import EndNodeData | ||||
| inputs=outputs, | inputs=outputs, | ||||
| outputs=outputs, | outputs=outputs, | ||||
| ) | ) | ||||
| @classmethod | |||||
| def _extract_variable_selector_to_variable_mapping( | |||||
| cls, | |||||
| *, | |||||
| graph_config: Mapping[str, Any], | |||||
| node_id: str, | |||||
| node_data: EndNodeData, | |||||
| ) -> Mapping[str, Sequence[str]]: | |||||
| """ | |||||
| Extract variable selector to variable mapping | |||||
| :param graph_config: graph config | |||||
| :param node_id: node id | |||||
| :param node_data: node data | |||||
| :return: | |||||
| """ | |||||
| return {} |
| from collections.abc import Mapping, Sequence | |||||
| from typing import Any, Literal | |||||
| from typing import Literal | |||||
| from typing_extensions import deprecated | from typing_extensions import deprecated | ||||
| return data | return data | ||||
| @classmethod | |||||
| def _extract_variable_selector_to_variable_mapping( | |||||
| cls, | |||||
| *, | |||||
| graph_config: Mapping[str, Any], | |||||
| node_id: str, | |||||
| node_data: IfElseNodeData, | |||||
| ) -> Mapping[str, Sequence[str]]: | |||||
| """ | |||||
| Extract variable selector to variable mapping | |||||
| :param graph_config: graph config | |||||
| :param node_id: node id | |||||
| :param node_data: node data | |||||
| :return: | |||||
| """ | |||||
| return {} | |||||
| @deprecated("This function is deprecated. You should use the new cases structure.") | @deprecated("This function is deprecated. You should use the new cases structure.") | ||||
| def _should_not_use_old_function( | def _should_not_use_old_function( |
| from collections.abc import Mapping, Sequence | |||||
| from typing import Any | |||||
| from core.workflow.entities.node_entities import NodeRunResult | from core.workflow.entities.node_entities import NodeRunResult | ||||
| from core.workflow.nodes.base import BaseNode | from core.workflow.nodes.base import BaseNode | ||||
| from core.workflow.nodes.enums import NodeType | from core.workflow.nodes.enums import NodeType | ||||
| from core.workflow.nodes.iteration.entities import IterationNodeData, IterationStartNodeData | |||||
| from core.workflow.nodes.iteration.entities import IterationStartNodeData | |||||
| from models.workflow import WorkflowNodeExecutionStatus | from models.workflow import WorkflowNodeExecutionStatus | ||||
| Run the node. | Run the node. | ||||
| """ | """ | ||||
| return NodeRunResult(status=WorkflowNodeExecutionStatus.SUCCEEDED) | return NodeRunResult(status=WorkflowNodeExecutionStatus.SUCCEEDED) | ||||
| @classmethod | |||||
| def _extract_variable_selector_to_variable_mapping( | |||||
| cls, graph_config: Mapping[str, Any], node_id: str, node_data: IterationNodeData | |||||
| ) -> Mapping[str, Sequence[str]]: | |||||
| """ | |||||
| Extract variable selector to variable mapping | |||||
| :param graph_config: graph config | |||||
| :param node_id: node id | |||||
| :param node_data: node data | |||||
| :return: | |||||
| """ | |||||
| return {} |
| from collections.abc import Mapping, Sequence | |||||
| from typing import Any | |||||
| from core.workflow.constants import SYSTEM_VARIABLE_NODE_ID | from core.workflow.constants import SYSTEM_VARIABLE_NODE_ID | ||||
| from core.workflow.entities.node_entities import NodeRunResult | from core.workflow.entities.node_entities import NodeRunResult | ||||
| from core.workflow.nodes.base import BaseNode | from core.workflow.nodes.base import BaseNode | ||||
| node_inputs[SYSTEM_VARIABLE_NODE_ID + "." + var] = system_inputs[var] | node_inputs[SYSTEM_VARIABLE_NODE_ID + "." + var] = system_inputs[var] | ||||
| return NodeRunResult(status=WorkflowNodeExecutionStatus.SUCCEEDED, inputs=node_inputs, outputs=node_inputs) | return NodeRunResult(status=WorkflowNodeExecutionStatus.SUCCEEDED, inputs=node_inputs, outputs=node_inputs) | ||||
| @classmethod | |||||
| def _extract_variable_selector_to_variable_mapping( | |||||
| cls, | |||||
| *, | |||||
| graph_config: Mapping[str, Any], | |||||
| node_id: str, | |||||
| node_data: StartNodeData, | |||||
| ) -> Mapping[str, Sequence[str]]: | |||||
| return {} |