Process Instance lifecycle monitoring

Hi!
How Can I subscribe on a running process? I would like to log or check If the process status has been changed.

After this: Long instanceId = zeebe.newCreateInstanceCommand()
.bpmnProcessId(processId)
.latestVersion()
.variables(processVariableMap)
.send()
.join()
.getProcessInstanceKey();

I have this method:processInstance = camundaService.getProcessInstance(processInstanceId);

I call it after processInstance creation but I get 404 to processInstanceId because the ProcessInstance is not created.

I would like to monitor the process lifecycle. Please help. Thank you

Interesting idea, can you tell me a little bit about the use case and what kind of status events you’d expect to get?

Hi! Sure,
Firstly, I create a new ProcessInstance with zeebe.newCreateInstanceCommand() method.

After that, I would like to get an event if the process status are ACTIVE or COMPLETED and I have to forward each process statuses to a Kafka topic.

I use camundaOperateClient.getProcessInstance(processInstanceId);
to get to know the process status but I get 404 ( because of there is a delay between zeebe and Operate). So what would be the right scenario?
I do not use any scheduler for this, How can I solve it?
and I have not decided that If I should asynchronous or synchronous calling. I prefer asynchronous to synchronous. Thank you for your help!

Hi @Zoltan_Karolyi,

I believe that zeebe-kafka-exporter can serve your needs.

zeebe-kafka-exporter will export Zeebe records to a configured Kafka topic.

Hi! Thank you. I use ElasticSearch exporter.

  • ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_CLASSNAME=io.camunda.zeebe.exporter.ElasticsearchExporter

Could I use this too?

Yes, you can use multiple exporters.

I thought that I use only Elastic or Custom exporter for monitoring process status changes. I have to manipulate data before I send it the Kafka topic. I would like to manage Kafka message sending myself

it works thank you

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.