External Task Client- Subscribe to dynamic topic names

Hi

I am using multiple external task clients as below:

client.subscribe(“ingestion”).lockDuration(10000).handler((externalTask, externalTaskService) -> {

		/* some work  */
System.out.println(“printing from my external task—”);
System.out.println(“The External Task Ingestion” + externalTask.getId() + " waiting to be completed!");

		}).open();

Here, as you can see, the topic name, ingestion is hard coded, and it should be same as the one entered in the bpmn.

I am wondering is there any way to decouple this? Since we are dealing with dynamic workflows, we don’t know in advance what topics the user will use. So hard coding is not an option.

Any suggestions is highly appreciated.

Hey Urvashi,

unfortunately it is not possible to fetch external tasks without a concrete topic name at the moment.
Would you like to contribute to the REST API of Camunda BPM Platform and the Java External Task Client?

Cheers,
Tassilo

What would be drawbacks of having some kind of wildcarding for topic names? Either .+ or % syntax. Is there any other wildcard syntax in Camunda?

As far as I understood, for the dynamic functionality one would need to stick to specific topic name, but then exploit External Task Input parameters to achieve variability needed.