Process Path Integration Documentation

Overview

This documentation describes how the Process Path bounded context integrates with all related domains in the Paklog fulfillment platform. Process Path is the strategic routing and orchestration system that determines how shipments flow through picking, packing, and shipping operations.


Quick Navigation

Document Description
Context Map Visual diagram of all bounded context relationships
Kafka Topology Topic naming conventions and partitioning strategy

Event Catalog

Document Description
Process Path Events Events published by Process Path
Consumed Events Events consumed from other contexts
Event Envelope Format CloudEvents standard and conventions

API Contracts

Contract Description
Routing API Shipment routing and path assignment
Capacity API Path capacity queries
Buffer API Buffer state management

Integration Specifications

Bounded Context Pattern Direction Document
Order Management Published Language Inbound order-management.md
Inventory Service Conformist Inbound inventory-service.md
Task Execution Service Customer-Supplier Outbound task-execution.md
Pick Execution Service Partnership Bidirectional pick-execution.md
Pack & Ship Service Open Host Service Outbound pack-ship.md
WES Orchestration Engine Partnership Bidirectional wes-orchestration.md
Wave Planning Service Published Language Inbound wave-planning.md
Workload Planning Service Conformist Inbound workload-planning.md
Shipment Transportation Customer-Supplier Outbound shipment-transportation.md
Physical Tracking Service Event Streaming Inbound physical-tracking.md
Robotics Fleet Management Partnership Bidirectional robotics-fleet.md
Location Master Service Conformist Inbound location-master.md

Architecture Overview

System Overview

flowchart TD
    subgraph ProcessPath["PROCESS PATH CORE"]
        ROUTING[Routing Service]
        ORCH[Orchestration Service]
    end

    subgraph Paths["PATH SERVICES"]
        SINGLES[Singles Path<br/>Direct Pack]
        AFE[AFE Path<br/>Sorter-Based]
        BATCH[Batch/Flow Path<br/>Wave-Based]
    end

    subgraph Final["COMPLETION"]
        SLAM[SLAM Operations<br/>Label & Manifest]
        SHIP[Carrier Handoff]
    end

    ROUTING --> SINGLES
    ROUTING --> AFE
    ROUTING --> BATCH
    ORCH -.->|capacity signals| ROUTING

    SINGLES --> SLAM
    AFE --> SLAM
    BATCH --> SLAM
    SLAM --> SHIP

End-to-End Event Flow

sequenceDiagram
    participant OM as Order Management
    participant ROUTING as Routing Service
    participant ORCH as Orchestration Service
    participant PATH as Path Services
    participant SLAM as SLAM Operations
    participant SHIP as Transportation

    OM->>ROUTING: OrderReleasedToWarehouseEvent
    Note over ROUTING: Evaluate path options<br/>based on capacity & SLA

    ROUTING->>ORCH: Query capacity state
    ORCH-->>ROUTING: Capacity snapshot

    ROUTING->>PATH: ShipmentRoutedToPathEvent
    Note over PATH: Execute pick/pack<br/>operations

    PATH->>SLAM: Packing completed
    SLAM->>SHIP: SLAMCompletedEvent
    Note over SHIP: Manifest & carrier handoff

Path Service Integration

flowchart LR
    ROUTING[Routing Service] -->|ShipmentRoutedToPathEvent| FILTER{Path Type?}

    FILTER -->|SINGLES| SINGLES[Singles Path Service]
    FILTER -->|AFE| AFE[AFE Path Service]
    FILTER -->|BATCH| BATCH[Batch Flow Service]

    SINGLES -->|PackingCompletedEvent| SLAM[SLAM Operations]
    AFE -->|RebinCompletedEvent| SLAM
    BATCH -->|ConsolidationCompletedEvent| SLAM

    SLAM -->|SLAMCompletedEvent| SHIP[Transportation]

Integration Patterns Used

Published Language

Used when the upstream context owns the contract and we consume their well-defined events.

Conformist

Used when we adapt to the upstream context’s model without negotiation.

Customer-Supplier

Used when we provide services to downstream consumers.

Partnership

Used for bidirectional collaboration with shared goals.

Open Host Service

Used when we expose a standardized interface for multiple consumers.

Event Streaming

Used for continuous flow of operational events.


Technology Stack

Component Technology Purpose
Event Bus Apache Kafka 3.5 Asynchronous event streaming
Event Format CloudEvents 1.0 Standardized event envelope
Schema Registry Confluent Schema Registry Event schema versioning
Sync APIs REST (OpenAPI 3.1) Synchronous queries
Caching Redis 7.2 High-speed capacity queries
Tracing OpenTelemetry Distributed tracing

Key Metrics

Metric Target Description
Event Processing Latency < 100ms Time from publish to consume
API Response Time < 50ms p99 Synchronous query latency
Event Delivery Rate 99.99% Successful event delivery
Schema Compatibility 100% Backward compatible changes

Document Conventions

Event Naming

API Versioning

Kafka Topics


Implementation Status

The following table shows the implementation status of each Process Path service integration.

Services Implemented

Service Events Published Events Consumed Status
process-path-commons - - Implemented
process-path-routing-service 3 8 Implemented
process-path-orchestration-service 5 8 Implemented
afe-path-service 3 2 Implemented
singles-path-service 0 1 Implemented
batch-flow-path-service 0 1 Implemented
slam-operations-service 1 0 Implemented

Events Published (12 Total)

Event Service Topic
ShipmentRoutedToPathEvent routing process-path.routing.v1.events
ShipmentReroutedEvent routing process-path.routing.v1.events
PathAssignmentFailedEvent routing process-path.routing.v1.events
PathCapacityChangedEvent orchestration process-path.orchestration.v1.events
WorkloadRebalanceTriggeredEvent orchestration process-path.orchestration.v1.events
SurgeDetectedEvent orchestration process-path.orchestration.v1.events
SLAPriorityEscalatedEvent orchestration process-path.orchestration.v1.events
SLABreachImminentEvent orchestration process-path.orchestration.v1.events
WallCapacityChangedEvent afe process-path.afe.v1.events
TrayCirculationImbalanceEvent afe process-path.afe.v1.events
DischargeJamDetectedEvent afe process-path.afe.v1.events
SLAMCompletedEvent slam wes.slam.v1.events

Events Consumed (20 Total)

Event Consuming Service Source Topic
OrderReleasedToWarehouseEvent routing fulfillment.order_management.v1.events
OrderCancelledEvent routing fulfillment.order_management.v1.events
InventoryAllocatedEvent routing fulfillment.inventory.v1.events
AllocationShortageEvent routing fulfillment.inventory.v1.events
WorkReleaseAuthorizedEvent routing wes.orchestration.v1.events
CircuitBreakerStateChangedEvent routing wes.orchestration.v1.events
WaveReleasedEvent routing fulfillment.wave.v1.events
WaveCancelledEvent routing fulfillment.wave.v1.events
CapacityForecastUpdatedEvent orchestration workload.planning.v1.events
LaborAvailabilityChangedEvent orchestration workload.planning.v1.events
ShipmentLocationUpdatedEvent orchestration tracking.v1.events
DwellTimeExceededEvent orchestration tracking.v1.events
AnomalyDetectedEvent orchestration tracking.v1.events
RobotTaskCompletedEvent orchestration, afe robotics.fleet.v1.events
PodDeliveredEvent orchestration, afe robotics.fleet.v1.events
RobotCapacityEvent orchestration robotics.fleet.v1.events
PackingCompletedEvent singles, batch wes.pack.v1.events

Shared Components (process-path-commons)

The commons library provides shared infrastructure:

Component Purpose
ProcessPathEvent Base interface for all domain events
EventHandler Strategy pattern interface for event handling
OutboxEvent MongoDB document for transactional outbox pattern
OutboxEventRepository Spring Data repository for outbox
OutboxEventRelay Scheduled publisher for reliable event delivery
CloudEventsKafkaConfig Kafka producer/consumer configuration

Change Log

Version Date Author Changes
1.1.0 2025-12-21 Development Team Added implementation status, updated topic names to v1 format
1.0.0 2025-01-20 Solution Architecture Initial documentation