Here’s the complete solution for handling bulk validation jobs via REST API without gateway timeouts:
1. Implement Asynchronous Job Pattern:
Submit validation jobs asynchronously and poll for completion rather than waiting for synchronous response. This addresses all three focus areas: API gateway limits, batch processing, and asynchronous job handling.
// Submit job - returns immediately
POST /Windchill/servlet/odata/v6/ValidationJobs
Response: 202 Accepted
Location: /AsyncOperations/job-12345
// Poll status separately
GET /AsyncOperations/job-12345
Response: {"state":"RUNNING","progress":45}
2. Batch Size Optimization:
Limit each validation job to 200-300 parts maximum. This keeps individual job execution under 5 minutes even with complex validation rules. For your 2,500 parts, create 10 separate jobs of 250 parts each.
3. Gateway Configuration:
Increase proxy timeout settings to at least 600 seconds for the initial job submission endpoint (though actual processing happens asynchronously). Configure:
- nginx: `proxy_read_timeout 600s;
- Apache: `ProxyTimeout 600
- Windchill method server: Verify wt.method.server.socketTimeout allows sufficient time
4. Polling Strategy:
Implement exponential backoff polling: start with 15-second intervals, increase to 30s, then 60s for long-running jobs. Stop polling once state reaches COMPLETED or FAILED. Always include error handling for network failures during polling.
5. Parallel Job Execution:
Submit multiple validation jobs in parallel (recommend max 3-5 concurrent jobs) to improve throughput while avoiding method server overload. Track all job IDs and aggregate results once all complete.
6. Result Retrieval:
Once job status shows COMPLETED, retrieve validation results from the job’s result URI (provided in the job status response). Parse results to identify validation failures and take appropriate action.
Implementation Checklist:
- Modify client code to handle 202 Accepted responses
- Implement job status polling with proper timeout/retry logic
- Break large datasets into optimal batch sizes (200-300 parts)
- Configure gateway/proxy timeouts appropriately
- Add logging for job tracking and failure diagnosis
- Test with progressively larger batches to verify stability
This approach eliminates gateway timeouts by decoupling job submission from execution, properly handles batch processing through optimal sizing, and leverages Windchill’s built-in asynchronous job infrastructure. We’ve successfully processed validation jobs with 10,000+ parts using this pattern without any timeout issues.
This draft is based on general Windchill knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.