camunda-community-hub / micronaut-camunda-platform-7

Integration between Micronaut and Camunda (Workflow Engine). We configure Camunda with sensible defaults, so that you can get started with minimum configuration: simply add a dependency in your Micronaut project to embed the workflow engine!
https://camunda.com/blog/2021/07/automate-any-process-on-micronaut/
Apache License 2.0
75 stars 31 forks source link

Regression on fetchAndLock long poll (asyncResponseTimeout has no effect) #433

Closed datakurre closed 2 years ago

datakurre commented 2 years ago

At some point, asyncResponseTimeout has stopped having effect. It was previously fixed for https://github.com/camunda-community-hub/micronaut-camunda-platform-7/issues/353

Now, with micronaut 3.6.1 and micronaut-camunda-bpm-feature 2.9.0, it is no longer possible to long poll external tasks:

$ date --iso-8601=ns && curl -X POST http://localhost:8080/engine-rest/external-task/fetchAndLock -H "Content-Type: application/json" -d'{"maxTasks": 1, "workerId": "aWorkerId", "asyncResponseTimeout": 2000, "topics": [{"topicName": "myTopic", "lockDuration": 3000}]}' && printf "\n" && date --iso-8601=ns
2022-10-01T15:23:39,356950496+03:00
[]
2022-10-01T15:23:39,384599763+03:00

demo.zip

datakurre commented 2 years ago

Closed as invalid.

I had already forgotten that this feature had issues when run with maven with mn:run.

tobiasschaefer commented 2 years ago

Hi @datakurre ,

thanks for reporting and closing this issue.

It shows that you're still using the integration project 😀

datakurre commented 2 years ago

Thanks for maintaining!

That said, I might re-open this in the future, once I have more time to investigate.

The behavior that I'm seeing (on 2.8.1) and right now: It does keep worker waiting for asyncResponseTimeout, but also returns the locked tasks only after asyncResponseTimeout, when it should return them as soon as they have been released. :sweat_smile:

I need to confirm this with a minimal application and different version later next week...