Pipeline Compilation and Generation ​
Overview ​
The Pipeline Framework uses YAML-first compilation to automatically generate the necessary infrastructure for pipeline execution. For internal service: steps:
pipeline.yamldeclares the service class, cardinality, domain input/output types, and optional inbound/outbound mappers- The Java service implements one supported TPF service contract
- The compiler validates the YAML contract against the implemented reactive service interface
- It generates transport adapters and client steps for the configured transport (gRPC or REST)
- It expands configured aspects into synthetic side effect steps when a plugin host is present
- It registers all generated components with the dependency injection container
This eliminates the need for manual configuration and ensures consistency across your pipeline.
Normalization before transport generation ​
V3 normalization establishes one canonical type universe before any Java or transport renderer runs. Application-authored types and records contributed through ProtocolTypeContributor therefore follow the same generation path once they are reachable from a pipeline contract:
authored or contributed type
↓
normalized canonical type
├── Java record
├── protobuf message
├── REST DTO and typed mapper
└── FUNCTION and queue representationsProtocol contributors own semantic vocabulary only. They do not provide REST DTOs, protobuf adapters, transport hooks, or application mappers. The compiler generates those representations from the normalized field definition and binds them to the Java representation used by the step. Repeated fields remain ordered and duplicate-preserving through each supported representation.
Generated metadata continues to name canonical types and contributed identities; generated DTO and mapper class names are implementation details. This follows ADR-0002: Compiler-owned v3 type model and ADR-0010: Generated boundaries and typed connectors.
The current transport-complete contributed slice covers records, including nested and repeated records. Wrappers, aliases, unions, and recursive union payloads require their corresponding normalized renderers before they can be used at every remote boundary.
Annotation Processing Workflow ​
Proto Generation (Pre-Processing) ​
Before annotation processing, pipeline protobuf contracts are generated from the pipeline template. For version 3 Java applications, the Java domain target is generated in the same lifecycle. The authoritative generators are:
These generators belong to the org.pipelineframework:pipelineframework-compiler artifact, which runs without a runtime integration dependency. Maven consumers declare this artifact explicitly on the generator classpath; the generator class names remain unchanged.
PipelineContractGenerator is the convenience lifecycle command that invokes both independent target generators. It does not make the project scaffolder responsible for DSL-derived domain code.
Build Timeline (gRPC) ​
Pipeline template
|
v
PipelineContractGenerator
| \
v v
protobuf contracts -> protoc -> descriptor set (.desc) Java domain records + adapters
| |
+---------------------+
|
v
Annotation processor -> adapters/clients/resources/CLI
|
v
CDI registration1. Build-Time Discovery ​
During the Maven build process, the compiler reads pipeline.yaml and resolves each internal service: step against the declared service class. @PipelineStep is still supported for existing code, but it is not required when YAML declares the step contract:
steps:
- name: process-payment
service: com.app.payment.ProcessPaymentService
cardinality: ONE_TO_ONE
input: com.app.domain.PaymentRecord
output: com.app.domain.PaymentStatus
inboundMapper: com.app.payment.PaymentRecordMapper
outboundMapper: com.app.payment.PaymentStatusMapper@ApplicationScoped
public class ProcessPaymentService implements ReactiveService<PaymentRecord, PaymentStatus> {
@Override
public Uni<PaymentStatus> process(PaymentRecord input) {
// Implementation
}
}YAML is the authoritative source for the step contract. If YAML and deprecated @PipelineStep contract metadata are both present, the compiler uses YAML and emits a warning.
1.1 Orchestrator and Plugin Annotations ​
The processor also reacts to:
@PipelineOrchestratoron a marker class to enable orchestrator endpoints and (optionally) CLI generation.@PipelinePluginon plugin services to enable plugin-server generation and plugin-aspect expansion.
These annotations do not define pipeline steps themselves, but they control which orchestrator and plugin artifacts are generated.
2. Compile-time Code Generation ​
The Pipeline Framework extension processor generates several classes:
- If
transport: GRPC, gRPC service adapters and gRPC client steps. - If
transport: REST, REST resource adapters and REST client steps. - Synthetic client steps for configured plugin aspects (in a plugin host module).
The processor also writes generated metadata under META-INF/pipeline/:
order.json: resolved runtime step order.telemetry.jsonandreplay-topology.json: replay and observability topology.platform.json: platform, transport, module, and plugin-host metadata.pipeline-contract.json: deterministic semantic contract and ordered step descriptors used by release validation and queue-async transition-worker validation.
2.5 Scaffolding ​
The template generator provides the necessary scaffolding for:
- Service and orchestrator entry points
- Step interfaces and DTO placeholders
- REST/gRPC adapter wiring and routing
- Configuration files and environment defaults
- Tests and sample fixtures
- CI/workflow stubs for build and release
3. Dependency Injection Registration ​
All generated classes are automatically registered with the CDI container, making them available for injection.