Workload Planning Service Integration

Overview

Attribute Value
Context Workload Planning Service
Pattern Conformist
Direction Inbound (Workload Planning β†’ Process Path)
Protocol Apache Kafka + REST API
Topics workload-planning.forecasts.*

Integration Summary

Workload Planning Service provides capacity forecasts and labor availability data. Process Path conforms to their data model and uses forecasts for proactive routing decisions and capacity planning.

1
2
3
4
5
6
7
8
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   WORKLOAD PLANNING     β”‚         β”‚      PROCESS PATH       β”‚
β”‚                         β”‚         β”‚                         β”‚
β”‚  β€’ Demand forecasting   β”‚  ─────► β”‚  β€’ Proactive routing    β”‚
β”‚  β€’ Labor planning       β”‚  Event  β”‚  β€’ Capacity scoring     β”‚
β”‚  β€’ Shift scheduling     β”‚  + API  β”‚  β€’ Bottleneck preventionβ”‚
β”‚  β€’ Resource allocation  β”‚         β”‚  β€’ Surge preparation    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Events Consumed

CapacityForecastUpdatedEvent

Purpose: Proactive capacity planning and routing adjustments

Topic: workload-planning.forecasts.capacity

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
  "specversion": "1.0",
  "type": "com.paklog.workload.forecast.v1",
  "source": "/workload-planning-service",
  "id": "evt-forecast-123456",
  "time": "2025-01-20T10:00:00.000Z",
  "data": {
    "forecastId": "FCST-2025-01-20-10",
    "forecastHorizon": "PT2H",
    "forecastIntervalMinutes": 30,
    "pathForecasts": [
      {
        "pathType": "SINGLES",
        "projectedUtilization": [75, 82, 88, 78],
        "laborAvailable": 15,
        "laborRequired": 18,
        "bottleneckRisk": "MEDIUM",
        "constraintTime": "2025-01-20T11:00:00Z",
        "recommendedAction": "ADD_STATIONS"
      },
      {
        "pathType": "AFE",
        "projectedUtilization": [68, 72, 80, 75],
        "laborAvailable": 24,
        "laborRequired": 22,
        "bottleneckRisk": "LOW",
        "recommendedAction": null
      },
      {
        "pathType": "BATCH_FLOW",
        "projectedUtilization": [40, 55, 65, 60],
        "laborAvailable": 10,
        "laborRequired": 12,
        "bottleneckRisk": "LOW",
        "recommendedAction": null
      }
    ],
    "volumeForecast": {
      "totalUnitsExpected": 5400,
      "singleItemOrders": 2200,
      "multiItemOrders": 800
    },
    "recommendedActions": [
      "SHIFT_SINGLES_TO_AFE",
      "ACTIVATE_RESERVE_STATIONS"
    ],
    "forecastConfidence": 0.85,
    "generatedAt": "2025-01-20T10:00:00Z"
  }
}

LaborAvailabilityChangedEvent

Purpose: Real-time labor updates for capacity adjustment

Topic: workload-planning.labor.availability

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
  "type": "com.paklog.workload.labor.availability.v1",
  "data": {
    "warehouseId": "WH-001",
    "effectiveTime": "2025-01-20T10:30:00Z",
    "laborChanges": [
      {
        "role": "PICKER",
        "previousCount": 25,
        "newCount": 22,
        "reason": "BREAK_ROTATION"
      },
      {
        "role": "PACKER",
        "previousCount": 18,
        "newCount": 20,
        "reason": "SHIFT_CHANGE"
      }
    ],
    "impactedPaths": ["SINGLES", "AFE"],
    "duration": "PT30M"
  }
}

ShiftChangeEvent

Purpose: Prepare for labor transitions

Topic: workload-planning.shifts.changed

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
  "type": "com.paklog.workload.shift.changed.v1",
  "data": {
    "warehouseId": "WH-001",
    "shiftEndTime": "2025-01-20T14:00:00Z",
    "shiftStartTime": "2025-01-20T14:30:00Z",
    "overlapPeriod": "PT30M",
    "laborTransition": {
      "outgoingWorkers": 45,
      "incomingWorkers": 50,
      "crossTrainedWorkers": 10
    },
    "expectedCapacityDip": 20,
    "dipDuration": "PT45M"
  }
}

REST API Queries

Get Current Labor

Endpoint: GET /api/v1/workload/labor/current

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
  "warehouseId": "WH-001",
  "timestamp": "2025-01-20T10:00:00Z",
  "laborByRole": {
    "pickers": 25,
    "packers": 18,
    "rebinners": 12,
    "inductors": 6,
    "problemSolve": 4
  },
  "laborByPath": {
    "SINGLES": {
      "pickers": 8,
      "packers": 10
    },
    "AFE": {
      "pickers": 12,
      "inductors": 6,
      "rebinners": 12,
      "packers": 5
    },
    "BATCH_FLOW": {
      "pickers": 5,
      "packers": 3
    }
  }
}

Get Forecast

Endpoint: GET /api/v1/workload/forecast?horizon=PT2H


Proactive Routing Adjustments

Process Path uses forecasts to adjust routing before bottlenecks occur:

Bottleneck Prevention

1
2
3
4
5
6
7
8
9
10
1. Receive CapacityForecastUpdatedEvent
2. Analyze projected utilization by path
3. Identify paths approaching constraint:
   - Singles: 88% projected in 60 min β†’ MEDIUM risk
4. Adjust routing weights proactively:
   - Reduce Singles affinity score by 15%
   - Increase AFE affinity score by 10%
5. Start shifting eligible shipments now
6. Monitor actual vs forecast
7. Adjust if forecast accuracy degrades

Labor-Aware Routing

1
2
3
4
5
6
7
8
When LaborAvailabilityChangedEvent received:

1. Map labor changes to path capacity
2. Calculate new effective capacity:
   - 22 pickers (was 25) β†’ 88% pick capacity
   - 20 packers (was 18) β†’ 111% pack capacity
3. Adjust path capacity scores
4. Rebalance if imbalance > 20%

Capacity Scoring Integration

Workload Planning forecasts influence routing scores:

Scoring Formula Adjustment

1
2
3
4
5
6
7
8
9
10
Base Score = capacityScore Γ— 0.4 + bufferScore Γ— 0.3 + laborScore Γ— 0.2 + affinityScore Γ— 0.1

With Forecast Adjustment:
laborScore = (laborAvailable / laborRequired) Γ— 100

If bottleneckRisk = HIGH:
  pathScore = pathScore Γ— 0.7  // 30% penalty

If bottleneckRisk = MEDIUM:
  pathScore = pathScore Γ— 0.85  // 15% penalty

Shift Change Handling

Process Path prepares for shift changes:

1
2
3
4
5
6
7
8
9
10
11
12
13
30 min before shift change:
1. Receive ShiftChangeEvent
2. Calculate expected capacity dip (20% for 45 min)
3. Adjust routing strategy:
   - Reduce new work release by 15%
   - Prioritize completing in-progress work
   - Queue new shipments for post-transition
4. During overlap period:
   - Route to paths with cross-trained workers
   - Avoid paths losing experienced workers
5. After transition:
   - Gradually return to normal routing
   - Monitor for training-related slowdowns

Volume Forecast Usage

Process Path uses volume forecasts for surge detection:

1
2
3
4
5
6
7
{
  "volumeForecast": {
    "totalUnitsExpected": 5400,
    "singleItemOrders": 2200,
    "multiItemOrders": 800
  }
}

Actions:


Feedback to Workload Planning

Process Path provides execution feedback:

Actual vs Forecast

1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "type": "com.paklog.processpath.forecast.feedback.v1",
  "data": {
    "forecastId": "FCST-2025-01-20-10",
    "pathType": "SINGLES",
    "hour": "2025-01-20T10:00:00Z",
    "forecastedUtilization": 75,
    "actualUtilization": 82,
    "variancePercent": 9.3,
    "forecastedVolume": 550,
    "actualVolume": 610,
    "insights": ["UNDERESTIMATED_SINGLE_ITEM_VOLUME"]
  }
}

Labor Effectiveness

1
2
3
4
5
6
7
8
9
10
11
12
{
  "type": "com.paklog.processpath.labor.feedback.v1",
  "data": {
    "pathType": "AFE",
    "hour": "2025-01-20T10:00:00Z",
    "laborCount": 24,
    "effectiveThroughput": 2200,
    "expectedThroughput": 2400,
    "efficiency": 91.7,
    "bottlenecks": ["REBIN_SLOWER_THAN_INDUCT"]
  }
}

Error Handling

Error Action
Missing forecast Use last known + conservative estimates
Stale forecast (> 30 min) Query API for refresh
Labor count mismatch Report discrepancy, use observed
Forecast accuracy < 70% Reduce forecast weight in scoring

Monitoring

Key Metrics

Alerts