Pipeline Template Guide ​
The pipeline template is the authoring front door to TPF's Functional Core, Imperative Shell model. It names the domain types and flow that form the application contract; small Java functions make the business decisions; the compiler validates both and generates the surrounding shell.
Start here ​
Follow the Guide according to the decision you are making:
- Model the Functional Core — decide what belongs in the domain contract and what belongs in the shell.
- Declare Canonical Types — choose products, wrappers, aliases, unions, constraints, and representations.
- Compose the Pipeline — connect typed steps, local definitions, Blocks, and bounded recursion.
- Declare Boundaries — keep Query, Command, Await, object I/O, and transport concerns outside business functions.
- Complete DSL Reference — use the exhaustive syntax and compatibility reference when implementing details.
The smallest useful template ​
yaml
version: 3
basePackage: com.example.orders
types:
OrderRequest:
fields: [[orderId, string], [amount, decimal]]
OrderDecision:
fields: [[accepted, boolean], [reason, string]]
contract:
input: OrderRequest
output: OrderDecision
steps:
- name: Decide order
service: com.example.orders.DecideOrder
output: OrderDecisionHere pipeline.yaml owns the logical types and flow. DecideOrder owns the business decision. TPF owns generated adapters, metadata, validation, and runtime integration.
Continue with Model the Functional Core.