Runic.Workflow.Definition (Runic v0.1.0-alpha.9)

Copy Markdown View Source

Durable construction data for a workflow used as a nested component.

A nested workflow cannot be reconstructed from its name and component registry alone. Its boundary ports and ordered build events are required to recreate both the internal graph and the boundary lowering. This struct is stored inside the parent workflow's %Runic.Workflow.ComponentAdded{} event and can itself contain nested workflow definitions recursively.

Runtime facts, run context, hooks, and runnable state are intentionally not part of this construction definition.

A workflow is treated as an authored nested boundary when it declares input_ports, output_ports, or both. Internal compiler workflows without boundary ports retain their existing composition behavior.

Output ports with from: component_name retain the ownership needed for a parent to resolve downstream named connections after replay. Contract-only outputs without :from are preserved but are not resolved by inference.

See the Cheatsheet and Usage Rules for the public construction API. This definition is an internal persistence contract and is not normally constructed directly.

Summary

Types

t()

@type t() :: %Runic.Workflow.Definition{
  build_log: [struct()],
  hash: term(),
  input_ports: keyword() | nil,
  name: String.t() | atom(),
  output_ports: keyword() | nil,
  version: pos_integer()
}