Hi Nikola,
Indeed my use case may not be very common, I will try to explain. The usual deployment is to deploy a camunda engine with external tasks that are somehow coupled to the engine itself. This coupling is represented by the fact that the service task implementation needs to know where to query for external tasks, making the deployment as a "pull tasks". What I wanted to achieve was to make the deployment a "push tasks" style, so it is actually a separate process who pulls the tasks from the camunda engine and then published these tasks as events expecting "someone" resolves them. So the events are the pushed tasks, and the process don't care who will resolve it, and the workers who process these tasks don't need to know about camunda, so a full decoupling is achieved for the workers. Because of this, the process who pulls the tasks will not know what topics there exists, it just wants to aquire tasks for any topic so it can emit the event for the task to be processed.
The code you suggest may work for querying tasks, but the problem is that they don't become locked. I do need to lock the tasks while querying them because I need to ensure the event for the task is emitted once. This is why i suggest the queryAndLock "*" feature, it was the only way I could solve it.
Hi unlimitechcloud.
Thank you for raising this feature request.
Can you expand upon your use case? In general, an external service task is handled by some custom logic in an external worker. Fetching & locking all external service tasks to be handled by a generic worker is not a common use case.
Furthermore, it is currently possible to query for all the available external service tasks by calling:
Are you aware of this API?
If no, would it work for you?
Best,
Nikola