Direct transfer workflows, flow-through processing, and intelligent cross-dock matching without storage, enabling rapid hub-and-spoke distribution and merge-in-transit operations.
The Cross-Docking Operations service is a critical component of the Paklog WMS/WES platform, enabling efficient direct transfer of goods from inbound to outbound shipments without intermediate storage. Cross-docking can reduce handling costs by 20-30%, decrease order cycle time by 40%, and minimize inventory holding costs, making it essential for time-sensitive and high-velocity distribution operations.
This service implements sophisticated algorithms for cross-dock matching, load consolidation, and flow-through processing. By eliminating storage steps and coordinating tightly synchronized inbound/outbound schedules, cross-docking maximizes facility throughput while minimizing touch points and cycle time.
The Cross-Docking Operations bounded context is responsible for:
- Cross-dock opportunity identification and matching
- Direct transfer workflow orchestration
- Flow-through processing coordination
- Load consolidation and deconsolidation
- Cross-dock performance optimization
- Hub-and-spoke distribution management
- Merge-in-transit operations
- Cross-dock timing window management
- Cross-Dock: Direct transfer of goods from receiving to shipping without storage
- Flow-Through: Items moving directly through the facility
- Transfer Order: Instruction to move items from inbound to outbound
- Cross-Dock Match: Pairing of inbound receipt with outbound shipment
- Consolidation: Combining multiple inbound loads into single outbound
- Deconsolidation: Splitting inbound load to multiple outbound destinations
- Cross-Dock Window: Time period for completing direct transfer
- Staging Lane: Temporary holding area for cross-dock items
- Hub-and-Spoke: Distribution model with central hub facility
- Merge-in-Transit: Combining shipments from multiple origins
- Touch Point: Each handling event for cross-dock items
- Flow Rate: Velocity of items through cross-dock operation
CrossDockOperation (Aggregate Root)
- Manages complete cross-dock workflow lifecycle
- Validates feasibility and timing constraints
- Coordinates inbound/outbound synchronization
- Enforces cross-dock business rules
TransferOrder
- Represents movement from inbound to outbound
- Tracks transfer execution and status
- Manages item quantities and conditions
- Links inbound receipts to outbound shipments
ConsolidationPlan
- Defines strategy for combining loads
- Optimizes load building and routing
- Manages consolidation timing windows
- Tracks consolidation efficiency metrics
StagingLane
- Manages temporary cross-dock staging area
- Tracks capacity and occupancy
- Enforces staging time limits
- Coordinates lane assignment
CrossDockType: DIRECT, CONSOLIDATED, DECONSOLIDATED, MERGE_IN_TRANSITTransferWindow: Time constraints for cross-dock completionCrossDockPriority: Urgency level for transfer executionFlowThroughRate: Items per hour throughputTouchCount: Number of handling eventsMatchQuality: Confidence score for cross-dock pairingStagingDuration: Time items spend in stagingTransferStatus: MATCHED, IN_PROGRESS, COMPLETED, FAILED
CrossDockOpportunityIdentifiedEvent: Potential match foundCrossDockMatchedEvent: Inbound paired with outboundTransferOrderCreatedEvent: Direct transfer initiatedStagingLaneAssignedEvent: Staging location allocatedTransferStartedEvent: Movement beganTransferCompletedEvent: Cross-dock finishedCrossDockWindowExpiredEvent: Time window missedConsolidationCompletedEvent: Load building finishedFlowThroughAchievedEvent: No-touch transfer completed
This service follows Paklog's standard architecture patterns:
- Hexagonal Architecture (Ports and Adapters)
- Domain-Driven Design (DDD)
- Event-Driven Architecture with Apache Kafka
- CloudEvents specification for event formatting
- CQRS for command/query separation
cross-docking-operations/
├── src/
│ ├── main/
│ │ ├── java/com/paklog/crossdocking/operations/
│ │ │ ├── domain/ # Core business logic
│ │ │ │ ├── aggregate/ # CrossDockOperation, TransferOrder
│ │ │ │ ├── entity/ # Supporting entities
│ │ │ │ ├── valueobject/ # CrossDockType, TransferWindow, etc.
│ │ │ │ ├── service/ # Domain services
│ │ │ │ ├── repository/ # Repository interfaces (ports)
│ │ │ │ └── event/ # Domain events
│ │ │ ├── application/ # Use cases & orchestration
│ │ │ │ ├── port/
│ │ │ │ │ ├── in/ # Input ports (use cases)
│ │ │ │ │ └── out/ # Output ports
│ │ │ │ ├── service/ # Application services
│ │ │ │ ├── command/ # Commands
│ │ │ │ └── query/ # Queries
│ │ │ └── infrastructure/ # External adapters
│ │ │ ├── persistence/ # MongoDB repositories
│ │ │ ├── messaging/ # Kafka publishers/consumers
│ │ │ ├── web/ # REST controllers
│ │ │ └── config/ # Configuration
│ │ └── resources/
│ │ └── application.yml # Configuration
│ └── test/ # Tests
├── k8s/ # Kubernetes manifests
├── docker-compose.yml # Local development
├── Dockerfile # Container definition
└── pom.xml # Maven configuration
- Intelligent Matching: AI-powered pairing of inbound/outbound shipments
- Flow-Through Processing: Zero-touch direct transfers
- Load Consolidation: Optimal combining of multiple inbound sources
- Time Window Management: Tight synchronization of inbound/outbound timing
- Staging Optimization: Minimal staging area utilization
- Hub-and-Spoke Coordination: Multi-location cross-dock orchestration
- Performance Analytics: Real-time cross-dock efficiency metrics
- Exception Management: Automated handling of timing conflicts
- Predictive cross-dock opportunity identification
- Multi-stop route optimization for consolidated loads
- Dynamic staging lane assignment
- Real-time capacity planning
- Cross-dock simulation and what-if analysis
- Automated cross-dock feasibility validation
- Integration with yard management for dock coordination
- Temperature-controlled cross-dock support
- Java 21 - Programming language
- Spring Boot 3.2.5 - Application framework
- MongoDB - Cross-dock operation persistence
- Redis - Real-time matching cache
- Apache Kafka - Event streaming
- CloudEvents 2.5.0 - Event format specification
- Resilience4j - Fault tolerance
- Micrometer - Metrics collection
- OpenTelemetry - Distributed tracing
- Java 21+
- Maven 3.8+
- Docker & Docker Compose
- MongoDB 7.0+
- Redis 7.2+
- Apache Kafka 3.5+
- Clone the repository
git clone https://github.com/paklog/cross-docking-operations.git
cd cross-docking-operations- Start infrastructure services
docker-compose up -d mongodb redis kafka- Build the application
mvn clean install- Run the application
mvn spring-boot:run- Verify the service is running
curl http://localhost:8095/actuator/health# Start all services
docker-compose up -d
# View logs
docker-compose logs -f cross-docking
# Stop all services
docker-compose downOnce running, access the interactive API documentation:
- Swagger UI: http://localhost:8095/swagger-ui.html
- OpenAPI Spec: http://localhost:8095/v3/api-docs
POST /api/v1/cross-dock/match- Find cross-dock opportunitiesGET /api/v1/cross-dock/opportunities- List potential matchesPOST /api/v1/cross-dock/confirm- Confirm cross-dock operationDELETE /api/v1/cross-dock/{operationId}/cancel- Cancel cross-dock
POST /api/v1/transfers- Create transfer orderGET /api/v1/transfers/{transferId}- Get transfer detailsPUT /api/v1/transfers/{transferId}/execute- Execute transferGET /api/v1/transfers/active- List active transfers
POST /api/v1/consolidation/plan- Create consolidation planGET /api/v1/consolidation/{planId}- Get consolidation detailsPOST /api/v1/consolidation/{planId}/build- Execute load building
GET /api/v1/analytics/flow-through-rate- Flow-through percentageGET /api/v1/analytics/touch-count- Average touch pointsGET /api/v1/analytics/cycle-time- Cross-dock cycle time
Key configuration properties in application.yml:
crossdocking:
operations:
matching:
auto-match-enabled: true
match-threshold-score: 0.85
max-staging-hours: 4
windows:
default-window-hours: 2
minimum-window-minutes: 30
maximum-window-hours: 24
staging:
max-lanes: 50
lane-capacity-pallets: 10
lane-utilization-target: 0.75
performance:
target-flow-through-rate: 0.90
max-touch-points: 2
target-cycle-time-hours: 2CrossDockOpportunityIdentifiedEvent- Potential match foundCrossDockMatchedEvent- Inbound/outbound pairedTransferOrderCreatedEvent- Transfer initiatedTransferCompletedEvent- Transfer finishedConsolidationCompletedEvent- Load consolidatedCrossDockWindowExpiredEvent- Timing missedFlowThroughAchievedEvent- Zero-touch success
InboundReceiptEventfrom Receiving (cross-dock source)OutboundShipmentEventfrom Shipping (cross-dock destination)DockDoorAssignedEventfrom Yard Management (dock coordination)AppointmentScheduledEventfrom Yard Management (timing sync)
# Create namespace
kubectl create namespace paklog-crossdock
# Apply configurations
kubectl apply -f k8s/deployment.yaml
# Check deployment status
kubectl get pods -n paklog-crossdock- Scaling: 3-5 replicas for high availability
- High Availability: Multi-zone deployment
- Resource Requirements:
- Memory: 1 GB per instance
- CPU: 0.5 core per instance
- Monitoring: Prometheus metrics at
/actuator/prometheus
# Run unit tests
mvn test
# Run integration tests
mvn verify
# Run with coverage
mvn clean verify jacoco:report- Unit Tests: >80%
- Integration Tests: >70%
- Domain Logic: >90%
- Match Generation: <100ms per opportunity
- Transfer Execution: <500ms per transfer
- Flow-Through Rate: >90% for eligible items
- Cross-Dock Cycle Time: <2 hours average
- Touch Points: <2 per item average
- Staging Utilization: 70-80% optimal
- Redis caching for active matches
- Async matching algorithms
- Connection pooling
- Batch transfer processing
- Pre-computed consolidation plans
- Flow-through percentage
- Average touch count
- Cross-dock cycle time
- Staging lane utilization
- Match success rate
- Window adherence percentage
/actuator/health- Overall health/actuator/health/liveness- Kubernetes liveness/actuator/health/readiness- Kubernetes readiness/actuator/health/mongodb- Database connectivity
OpenTelemetry integration tracking items from receipt to shipment.
- Handling Cost: -25% reduction through fewer touches
- Cycle Time: -40% faster order-to-ship time
- Storage Cost: -100% for cross-docked items (zero storage)
- Labor Efficiency: +30% through streamlined workflows
- Throughput: +50% facility capacity with same footprint
- Flow-Through Rate: 85-95% for eligible items
- Customer Service: -2 days average lead time reduction
-
Low Match Rate
- Review matching algorithm parameters
- Check inbound/outbound timing alignment
- Verify product eligibility criteria
- Examine consolidation opportunities
-
Window Expiration
- Analyze staging duration patterns
- Review transfer execution times
- Check dock door availability
- Verify labor capacity
-
Staging Congestion
- Review lane assignment strategy
- Check staging time limits enforcement
- Verify transfer order priorities
- Analyze flow-through bottlenecks
-
High Touch Count
- Review cross-dock workflow design
- Check for unnecessary intermediate steps
- Verify direct transfer routing
- Analyze staging requirements
- Follow hexagonal architecture principles
- Maintain domain logic in domain layer
- Keep infrastructure concerns separate
- Write comprehensive tests for all changes
- Document domain concepts using ubiquitous language
- Follow existing code style and conventions
For issues and questions:
- Create an issue in GitHub
- Contact the Paklog team
- Check the documentation
Copyright 2024 Paklog. All rights reserved.
Version: 1.0.0 Phase: 2 (Optimization) Priority: P1 (High) Maintained by: Paklog Cross-Dock Operations Team Last Updated: November 2024