Class XmlByProcessDefinitionIdConsumer
java.lang.Object
io.taktx.client.XmlByProcessDefinitionIdConsumer
This class is responsible for managing the subscription to external tasks for all process
definitions.
-
Constructor Summary
ConstructorsConstructorDescriptionXmlByProcessDefinitionIdConsumer(io.taktx.util.TaktPropertiesHelper taktPropertiesHelper, Executor executor) Constructor for XmlByProcessDefinitionIdConsumer. -
Method Summary
Modifier and TypeMethodDescriptiongetProcessDefinitionXml(io.taktx.dto.ProcessDefinitionKey processDefinitionKey) Retrieves the process definition XML for the given process definition key.voidstop()Stops the consumer from processing further records.voidSubscribes to the topic for XML by process definition ID and starts consuming messages asynchronously.
-
Constructor Details
-
XmlByProcessDefinitionIdConsumer
public XmlByProcessDefinitionIdConsumer(io.taktx.util.TaktPropertiesHelper taktPropertiesHelper, Executor executor) Constructor for XmlByProcessDefinitionIdConsumer.- Parameters:
taktPropertiesHelper- the TaktPropertiesHelper to use for configurationexecutor- the Executor to use for asynchronous processing
-
-
Method Details
-
subscribeToTopic
public void subscribeToTopic()Subscribes to the topic for XML by process definition ID and starts consuming messages asynchronously. -
getProcessDefinitionXml
public String getProcessDefinitionXml(io.taktx.dto.ProcessDefinitionKey processDefinitionKey) throws IOException Retrieves the process definition XML for the given process definition key.- Parameters:
processDefinitionKey- the key of the process definition- Returns:
- the XML content as a String, or null if not found
- Throws:
IOException- if an I/O error occurs reading from the file
-
stop
public void stop()Stops the consumer from processing further records.
-