Hello,
I have a local Camunda 7 running with Docker Desktop on Windows. I can start a process instance successfully, it appears in the cockpit, the instance is correctly showing.
The GET “http://localhost:8080/engine-rest/external-task/“ returns successfully the tasks I created.
But the POST “http://localhost:8080/engine-rest/external-task/fetchAndLock“ with body
{ “workerId“: “ServiceCamundaWorker“, “maxTasks”: 1, “topics“: [{ “topicName“: “test_service_task“, “lockDuration“: 600000 }] }
returns an empty array ““
I have a C# HandlerTopics with the nuget packages Camunda.Api.Client and Camunda.Worker.
I created a handler like this:
[HandlerTopics("test_service_task", LockDuration = 1000 * 60 * 10)]
public class TestHandler : IExternalTaskHandler
{
public async Task<IExecutionResult> HandleAsync(ExternalTask externalTask, CancellationToken cancellationToken)
{
await Task.Delay(1000, cancellationToken);
return new CompleteResult();
}
}
But unfortunately, the handler does not work. The task remains on the process instance.
How can I troubleshoot this problem? This was working a week ago but it’s been a few days it’s no longer working, without changing anything in the code.