Flow Services
A Flow Service is the primary unit of logic in Joynare Nexus. It represents a sequence of processing steps defined in a YAML file.
Structure
Every Flow Service lives in a directory named after itself, containing a flow.yaml file.
text
flows/
namespace/
MyService/
flow.yamlThe YAML Definition
A typical flow.yaml includes:
- name: The service name.
- namespace: The logical grouping.
- pipeline: Metadata defining inputs and outputs.
- steps: An ordered array of processing steps.
Step Types
Joynare Nexus supports several step types to build complex logic:
| Type | Purpose |
|---|---|
invoke | Calls another service (Built-in, Flow, or Adapter). |
map | Directly manipulates pipeline variables (Set, Copy, Drop). |
branch | Conditional logic (Switch or Expression modes). |
sequence | Groups steps with error handling strategies (Try/Catch). |
loop | Iterates over an array in the pipeline. |
repeat | Re-executes steps based on count or success/failure. |
exit | Terminates a flow, loop, or sequence early. |
Example
yaml
name: "ProcessOrder"
namespace: "orders"
pipeline:
input:
orderId: "string"
steps:
- name: "FetchData"
type: "invoke"
service: "orders:GetOrderById"
input:
id: "${orderId}"
---
## See Also
- [The Pipeline Concept](./pipeline)
- [Step Types Overview](./control-flow)
- [How to run Flows](../showcase/index)