I’m new to Camunda and I’ve been trying to get external tasks to work with a Lumen back-end. I’ve been following the examples at REST API documentation, and right now I’m stumped. Whenever I send a POST request to /engine-rest/fetchAndLock with the body
{
“workerId”:“aWorkerId”,
“maxTasks”:2,
“usePriority”:false,
“topics”:
[{“topicName”: “createOrder”,
“lockDuration”: 10000,
“variables”: [“orderId”]
}]
}
The response is
RESTEASY003320: Failed processing arguments of public void org.camunda.bpm.engine.rest.impl.FetchAndLockRestServiceImpl.fetchAndLock(org.camunda.bpm.engine.rest.dto.externaltask.FetchExternalTasksExtendedDto,javax.ws.rs.container.AsyncResponse)
Could you please help me figure out what I’m doing wrong?
firstly, thank you for your great video tutorials on YouTube. Secondly, I have Camunda running, and my model is already deployed. I’m on Windows 10 and the Camunda version is v7.11.0.
Are you able to just test the REST API is working.?
enter the following in your browser to check it’s reachable. http://localhost:8080/engine-rest/engine
Yes, the REST API is working and I’ve deployed and completed processes/tasks before. I can carry out a GET request to /engine-rest/external-task?processInstanceId=xxxx and retrieve the external task. I can’t however carry out a fetchAndLock POST request, and because I can’t fetchAndLock the task, when I try to complete the task I receive:
{
“type”: “RestException”,
“message”: “External Task 5557710f-fef4-11e9-b440-d43b04212cfe cannot be completed by worker ‘aWorker’. It is locked by worker ‘null’.”
}
Hi @Niall, after a couple of hours of pulling my hair out I’ve decided to try to run camunda on a docker container and that seems to have done the trick. I don’t know what’s preventing windows version of Camunda to not work properly, maybe it is my JDK version (openjdk 12) that is causing the issue. Running Camunda on Windows caused issues again that could only be solved by clearing docker cache…