Raised when connecting two components with incompatible port contracts.
This occurs when Workflow.add/3 detects that a producer's output ports
are not type-compatible with a consumer's input ports.
Example
require Runic
alias Runic.Workflow
int_step = Runic.step(fn x -> x + 1 end,
name: :int_producer,
outputs: [out: [type: :integer]]
)
string_consumer = Runic.step(fn x -> String.upcase(x) end,
name: :string_consumer,
inputs: [in: [type: :string]]
)
# This raises IncompatiblePortError
Workflow.new()
|> Workflow.add(int_step)
|> Workflow.add(string_consumer, to: :int_producer)Solutions
- Ensure output types match expected input types
- Use
type: :anyfor flexible ports - Pass
validate: :offto bypass validation during prototyping