camunda-community-hub / kafka-connect-zeebe

Kafka Connect for Zeebe.io
Apache License 2.0
96 stars 52 forks source link

how to add variables into messages from topic zeebe-process-instance #193

Closed eyesmoker closed 8 months ago

eyesmoker commented 8 months ago

I have a requirement to know at what time users are entering workflows and exiting them, capture it in database. I have user_id variable that is sent when creating the process instance. When I inspect zeebe-process-instance kafka topic, I dont see the variable coming.Am I missing any configuration in exporter yaml?

Note: I can see them in zeebe-variable topic but I have to do additional processing in kafka consumer. So, trying to avoid it and see if there is a better way.

{"partitionId":2,"value":{"processDefinitionKey":2251799816253646,"processInstanceKey":4503599629934205,"tenantId":"<default>","elementId":"Process_1f1f2a6","bpmnProcessId":"Process_1f1f2a6","bpmnElementType":"PROCESS","flowScopeKey":-1,"bpmnEventType":"UNSPECIFIED","parentProcessInstanceKey":-1,"parentElementInstanceKey":-1,"version":7},"key":4503599629934205,"timestamp":1704962900608,"valueType":"PROCESS_INSTANCE","brokerVersion":"8.3.4","recordType":"EVENT","sourceRecordPosition":5129600,"intent":"ELEMENT_ACTIVATING","rejectionType":"NULL_VAL","rejectionReason":"","authorizations":{"authorized_tenants":["<default>"]},"recordVersion":1,"position":5129604}

{"partitionId":2,"value":{"processDefinitionKey":2251799816253646,"processInstanceKey":4503599629934205,"tenantId":"<default>","elementId":"Process_1f1f2a6","bpmnProcessId":"Process_1f1f2a6","bpmnElementType":"PROCESS","flowScopeKey":-1,"bpmnEventType":"UNSPECIFIED","parentProcessInstanceKey":-1,"parentElementInstanceKey":-1,"version":7},"key":4503599629934205,"timestamp":1704962915899,"valueType":"PROCESS_INSTANCE","brokerVersion":"8.3.4","recordType":"EVENT","sourceRecordPosition":5129701,"intent":"ELEMENT_COMPLETED","rejectionType":"NULL_VAL","rejectionReason":"","authorizations":{"authorized_tenants":["<default>"]},"recordVersion":1,"position":5129715}

Appreciate your help.

Thanks Janardhan.