Skip to main content

Module protocol

Module protocol 

Source
Expand description

Typed protocol descriptors for executors and workflows.

Port of upstream’s ProtocolDescriptor / ProtocolBuilder / DescribeProtocol. Messages in this port are JSON values, so a “type” is a name: one the workflow’s author chooses ("Order", "Approval") or a JSON type name ("string", "object"). An executor declares what it accepts, sends and yields with Executor::describe_protocol; WorkflowBuilder::build then refuses an edge whose source sends nothing its target accepts, and Workflow::describe_protocol reports what the workflow as a whole accepts and yields.

Executors that declare nothing accept everything, as before, so the check only binds where both ends of an edge are declared.

Structs§

ProtocolBuilder
Builds a ProtocolDescriptor.
ProtocolDescriptor
What an executor (or a workflow) accepts, sends and yields.
RequestPortInfo
A request port’s request and response types (upstream RequestPort).