Hi there! ![]()
Great question about the API endpoint behavior. Let me clarify what’s happening here.
Why /v2/user-tasks instead of /v1/tasks?
The camundaClient.newCompleteUserTaskCommand is correctly using the Camunda 8 REST API v2 endpoint (/v2/user-tasks/:taskId/completion). This is the expected behavior for Camunda 8.9, and here’s why:
API Evolution in Camunda 8
- v2 API (
/v2/user-tasks) is the current standard for Camunda/Zeebe user tasks lifecycle operations (assign, unassign, update, complete) - v1 API (
/v1/tasks) is the legacy Tasklist API that’s been deprecated since 8.8 and is scheduled for removal in 8.10
Key Differences:
- v2: For Camunda user tasks (modeled as Camunda/Zeebe User Task elements)
- v1: For legacy job worker-based user tasks
The Real Issue: 503 Service Unavailable
The problem isn’t the endpoint choice - it’s the 503 error indicating a connection issue with the brokers. This typically means:
- Gateway-to-Broker routing problem - The gateway can’t deliver the request to a broker/partition
- Partition awareness issue - The gateway isn’t aware of the partition where your task resides
- Configuration mismatch - Incorrect addresses or context paths
Troubleshooting Steps:
1. Check Gateway/Broker Health
# Check logs for partition/connection errors
docker logs <zeebe-broker>
docker logs <zeebe-gateway>
# Health check
curl http://localhost:9600/actuator/health
2. Verify Configuration
Make sure your Spring Boot configuration is correct:
camunda:
client:
mode: self-managed
zeebe:
rest-address: http://{gateway-host}:{gateway-rest-port}
# Include context path if configured (e.g., /zeebe)
3. Common Fixes:
- Restart the gateway if it lost partition awareness
- Include context path in rest-address if your gateway is configured with one
- Ensure version compatibility between your client (8.9.0-SNAPSHOT) and cluster
- Check port configuration - Use gateway’s REST port (typically 8080), not Tasklist port (8082)
References:
The endpoint choice is correct - focus on resolving the broker connectivity issue. Let me know if you need help with any specific configuration details!