Bulk approval via API fails with 409 Conflict when parallel approval tasks exist in workflow

We’re implementing automated approval processing using the Windchill REST API for bulk operations. When attempting to approve multiple workflow tasks simultaneously (20-30 tasks in parallel threads), we consistently get 409 Conflict errors. The parallel workflow task handling seems problematic.

Our code attempts bulk approvals:

POST /Windchill/servlet/odata/v6/PTC/WorkItems('{taskId}')/PTC.ApproveTask
Content-Type: application/json
{"Comment": "Auto-approved by system"}

Error response shows task state conflicts. We’ve tried sequential processing but it’s too slow for our volume (500+ daily approvals). Need conflict resolution strategies that maintain performance. Anyone solved bulk approval API limitations with parallel execution?

Thanks for the insights. We’re grouping tasks by process instance now to avoid conflicts within same workflow. The 5-thread limit with backoff sounds reasonable. Are there any Windchill configuration parameters that control workflow lock timeout or concurrency limits? We’re on 12.0 CPS05.

We faced this exact issue last year. The problem is Windchill’s workflow state machine isn’t designed for high-concurrency external updates. Each approval triggers state transitions that lock the entire process context briefly. When you have 20-30 parallel requests, they queue up and timeout. We reduced parallelism to 5 concurrent threads with exponential backoff retry logic (wait 2s, 4s, 8s on 409). This got us to 95% success rate. Still not perfect but manageable for our 300 daily approvals. The bulk approval API limitations are real - PTC documentation doesn’t emphasize the concurrency constraints enough.

Check the wt.workflow.engine.maxConcurrentActivities property in site.xconf. Default is often too conservative. We increased it from 10 to 25 for our high-volume environment. Also review database connection pool settings - insufficient connections can cause artificial conflicts when the workflow engine can’t get DB resources quickly enough. The parallel workflow task handling improves significantly with proper resource allocation. Monitor your Method Server logs during bulk operations to see actual lock wait times.