Class ProcessInstanceProducer

java.lang.Object
io.taktx.client.ProcessInstanceProducer

public class ProcessInstanceProducer extends Object
A producer for process instance triggers, responsible for producing and sending ProcessInstanceTriggerDTO objects to a Kafka topic.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProcessInstanceProducer(io.taktx.util.TaktPropertiesHelper kafkaPropertiesHelper)
    Constructor for ProcessInstanceProducer.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    abortElementInstance(UUID processInstanceId, List<Long> elementInstanceIdPath)
    Aborts a specific element instance within a process instance by sending an AbortTriggerDTO to the configured Kafka topic.
    void
    abortProcessInstance(UUID processInstanceId)
    Aborts a process instance by sending an AbortTriggerDTO to the configured Kafka topic.
    startProcess(String processDefinitionId, io.taktx.dto.VariablesDTO variables)
    Starts a new process instance by sending a StartCommandDTO to the configured Kafka topic.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ProcessInstanceProducer

      public ProcessInstanceProducer(io.taktx.util.TaktPropertiesHelper kafkaPropertiesHelper)
      Constructor for ProcessInstanceProducer.
      Parameters:
      kafkaPropertiesHelper - the TaktPropertiesHelper to use for configuration
  • Method Details

    • startProcess

      public UUID startProcess(String processDefinitionId, io.taktx.dto.VariablesDTO variables)
      Starts a new process instance by sending a StartCommandDTO to the configured Kafka topic.
      Parameters:
      processDefinitionId - the ID of the process definition to start
      variables - the initial variables for the process instance
      Returns:
      the UUID of the started process instance
    • abortProcessInstance

      public void abortProcessInstance(UUID processInstanceId)
      Aborts a process instance by sending an AbortTriggerDTO to the configured Kafka topic.
      Parameters:
      processInstanceId - the UUID of the process instance to abort
    • abortElementInstance

      public void abortElementInstance(UUID processInstanceId, List<Long> elementInstanceIdPath)
      Aborts a specific element instance within a process instance by sending an AbortTriggerDTO to the configured Kafka topic.
      Parameters:
      processInstanceId - the UUID of the process instance containing the element instance
      elementInstanceIdPath - the path of element instance IDs leading to the target element instance to abort