mirror of
https://github.com/langgenius/dify.git
synced 2026-05-03 17:08:03 +08:00
Do not allow create WorkflowTool from workflows containing HumanInput nodes (vibe-kanban 9e27ac53)
The HumanInput node will pause the execution of workflow if execution, while WorkflowTool works in a blocking manner. (Receiving arguments and returning results once finished). The two mode are inherently incompatible. The goal of this change is to forbid workflows containing HumanInput node being published as WorkflowTool. Please check the current implementation and propose a solution.
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
from libs.exception import BaseHTTPException
|
||||
|
||||
from core.tools.entities.tool_entities import ToolInvokeMeta
|
||||
|
||||
|
||||
@ -37,6 +39,12 @@ class ToolCredentialPolicyViolationError(ValueError):
|
||||
pass
|
||||
|
||||
|
||||
class WorkflowToolHumanInputNotSupportedError(BaseHTTPException):
|
||||
error_code = "workflow_tool_human_input_not_supported"
|
||||
description = "Workflow with Human Input nodes cannot be published as a workflow tool."
|
||||
code = 400
|
||||
|
||||
|
||||
class ToolEngineInvokeError(Exception):
|
||||
meta: ToolInvokeMeta
|
||||
|
||||
|
||||
Reference in New Issue
Block a user