Class XmlByProcessDefinitionIdConsumer

java.lang.Object
io.taktx.client.XmlByProcessDefinitionIdConsumer

public class XmlByProcessDefinitionIdConsumer extends Object
This class is responsible for managing the subscription to external tasks for all process definitions.
  • Constructor Details

    • XmlByProcessDefinitionIdConsumer

      public XmlByProcessDefinitionIdConsumer(io.taktx.util.TaktPropertiesHelper taktPropertiesHelper, Executor executor)
      Constructor for XmlByProcessDefinitionIdConsumer.
      Parameters:
      taktPropertiesHelper - the TaktPropertiesHelper to use for configuration
      executor - 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.