CMDCOrchestrator.WorkflowSpec.EdgeSpec (cmdc_orchestrator v0.5.0)

Copy Markdown View Source

Workflow 边持久化规格。

边始终指向稳定 node.id;label 只用于 UI 展示,branch 兼容 router 分支剪枝,signal / when 用于通用 signal-driven edge。

Summary

Functions

构建边规格,返回错误元组而不是抛异常。

构建边规格,非法输入抛出 NimbleOptions.ValidationError

返回边规格 NimbleOptions schema。

Types

t()

@type t() :: %CMDCOrchestrator.WorkflowSpec.EdgeSpec{
  branch: String.t() | nil,
  from: String.t(),
  label: String.t() | nil,
  metadata: map(),
  signal: String.t() | nil,
  to: String.t(),
  when: String.t() | nil
}

Functions

new(input)

@spec new(map() | keyword() | t()) :: {:ok, t()} | {:error, term()}

构建边规格,返回错误元组而不是抛异常。

new!(spec)

@spec new!(map() | keyword() | t()) :: t()

构建边规格,非法输入抛出 NimbleOptions.ValidationError

schema()

@spec schema() :: NimbleOptions.t()

返回边规格 NimbleOptions schema。