camunda-external-task-client-python3
camunda-external-task-client-python3 copied to clipboard
Allow subscribing to a specific businessKey
Right now for when a worker is configured, it subscribes from all businessKeys for a list of topics.
I have a use case where there are multiple process instances running with different business keys.
This behavior is supported in the fetchAndLock REST call.
def _get_topics(self, topic_names, process_variables):
topics = []
for topic in str_to_list(topic_names):
dct = {
"topicName": topic,
"lockDuration": self.config["lockDuration"],
"processVariables": process_variables if process_variables else {}
}
if("businessKey" in self.config):
dct["businessKey"] = self.config["businessKey"]
topics.append(dct)
return topics
Updating the above method in ExternalTaskClient (external_task_client.py) fixed this.
Will add a PR later today
Hello @bangeneticalgorithms Can you please add the PR for this functionality? Thank you.