The Channel Concept
Channels are how Events are passed between Nodes and Milestones. Channels can be made to accept specificly named Events so you can control how Requests move through a flow.
If a Node or Milestone throws an exception and the preceding Channel had retry options set, the failed Event will be retried from its initial state a number times and with delays based on those options. When the retry options are exhausted, an Error Event will be sent to all connected Error Channels.
Retry options
retry
can be a number of retries to attempt or a string of an Action name to use to generate a number of retries.returns a number.retryDelay
can be a number of milliseconds to wait between retry attempts or a string of an Action name to use to generate a millisecond number.
FlowNote
This defines a Flow as a Node connecting to another Node.
flow example(GET /example) = someNode -> anotherNode
This defines a Flow as a Node connecting to another Node with a custom reference. The referenced Node is then attached to the last Node.
flow example(GET /example) = someNode -> anotherNode#customReference
customReference -> lastNode
This defines a Flow as a Node connecting to another Node with a custom reference. The referenced Node is then attached to the last Node via an Error Channel (!) that listens for RangeErrors
.
Channel names can only be letters or numbers.
flow example(GET /example) = someNode -> anotherNode#customReference
customReference -RangeError! lastNode
This defines a Flow as a Node connecting to another Node with a custom reference. The referenced Node is then attached to the last Node via an Named Channel that listens for Named
events.
flow example(GET /example) = someNode -> anotherNode#customReference
customReference -NamedChannel> lastNode
This defines a Flow as a Node connecting to another Node with a custom reference. The referenced Node is then attached to the last Node with retry options.
flow example(GET /example) = someNode -> anotherNode#customReference
customReference -{ retry: 3, retryDelay: 3000 }> lastNode
This defines a Flow as a Node connecting to another Node with a custom reference. The referenced Node is then attached to the last Node with retry options set by returned results of an Action.
flow example(GET /example) = someNode -> anotherNode#customReference
customReference -{ retry: someActionThatReturnsNumber, retryDelay: someActionThatReturnsMilliseconds }> lastNode
Examples
- Programmatic example of a Standard Channel.
- Programmatic example of an Error Channel.
- Programmatic example of a Retry Channel.
- Programmatic example of a Retry Channel defined by the results of an Action.
- FlowNote example of a Standard Channel.
- FlowNote example of an Error Channel.
- FlowNote example of a Retry Channel.
Documentation
( Installation | Features | Use Cases | Language | Application | Flow | Nodes | Channels | Contribution Overview | Roadmap | Known Problems )