Class UserTaskInstanceResponder
java.lang.Object
io.taktx.client.UserTaskInstanceResponder
A responder for user task instances that allows sending success, escalation, or error responses
back to the process instance via Kafka.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrespondError(String code, String message) Sends an error response with the provided code and message, and no variables.voidrespondError(String code, String message, io.taktx.dto.VariablesDTO variables) Sends an error response with the provided code and message, and optional variables.voidrespondEscalation(String code, String message) Sends an escalation response with the provided code and message, and no variables.voidrespondEscalation(String code, String message, io.taktx.dto.VariablesDTO variables) Sends an escalation response with the provided code, message, and variables.voidSends a success response with no variables.voidrespondSuccess(Object variable) Sends a success response with the provided variables.voidrespondSuccess(Map<String, com.fasterxml.jackson.databind.JsonNode> variablesMap) Sends a success response with the provided variables map.
-
Constructor Details
-
UserTaskInstanceResponder
public UserTaskInstanceResponder(org.apache.kafka.clients.producer.KafkaProducer<UUID, io.taktx.dto.ContinueFlowElementTriggerDTO> responseEmitter, String topicName, UUID processInstanceId, List<Long> elementInstanceIdPath) Constructs a UserTaskInstanceResponder.- Parameters:
responseEmitter- the Kafka producer used to send responsestopicName- the name of the Kafka topic to send responses toprocessInstanceId- the ID of the process instance associated with the user taskelementInstanceIdPath- the path of element instance IDs leading to the user task
-
-
Method Details
-
respondSuccess
public void respondSuccess()Sends a success response with no variables. -
respondSuccess
Sends a success response with the provided variables.- Parameters:
variable- the variables to include in the response, can be null
-
respondSuccess
-
respondEscalation
-
respondEscalation
-
respondError
-
respondError
-