Class ProcessInstanceProducer
java.lang.Object
io.taktx.client.ProcessInstanceProducer
A producer for process instance triggers, responsible for producing and sending
ProcessInstanceTriggerDTO objects to a Kafka topic.
-
Constructor Summary
ConstructorsConstructorDescriptionProcessInstanceProducer(io.taktx.util.TaktPropertiesHelper kafkaPropertiesHelper) Constructor for ProcessInstanceProducer. -
Method Summary
Modifier and TypeMethodDescriptionvoidabortElementInstance(UUID processInstanceId, List<Long> elementInstanceIdPath) Aborts a specific element instance within a process instance by sending an AbortTriggerDTO to the configured Kafka topic.voidabortProcessInstance(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.
-
Constructor Details
-
ProcessInstanceProducer
public ProcessInstanceProducer(io.taktx.util.TaktPropertiesHelper kafkaPropertiesHelper) Constructor for ProcessInstanceProducer.- Parameters:
kafkaPropertiesHelper- the TaktPropertiesHelper to use for configuration
-
-
Method Details
-
startProcess
Starts a new process instance by sending a StartCommandDTO to the configured Kafka topic.- Parameters:
processDefinitionId- the ID of the process definition to startvariables- the initial variables for the process instance- Returns:
- the UUID of the started process instance
-
abortProcessInstance
Aborts a process instance by sending an AbortTriggerDTO to the configured Kafka topic.- Parameters:
processInstanceId- the UUID of the process instance to abort
-
abortElementInstance
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 instanceelementInstanceIdPath- the path of element instance IDs leading to the target element instance to abort
-