public Parameters request(Parameters parameters) {
ZeebeClient client = ZeebeBrokerProvider.getClient();
final WorkflowInstanceEvent wfInstance = client.newCreateInstanceCommand()
.bpmnProcessId("my-process")
.latestVersion()
.variables(parameters.asMap())
.send()
.join();
final JobWorker firstStep = client.newWorker()
.jobType("first-step-service")
.handler(new FisrtStepServiceHandler())
.open();
final JobWorker secondStep = client.newWorker()
.jobType("second-step-service")
.handler(new SecondStepServiceHandler())
.open();
//get status and some variables back when ended
return null;
}
I would like for program to wait until instance has finished and then get variables from this instance. Is that achievable using Zeebe? How can I do that?
Cheers,
Mateusz
@mpawlowski right now I would recommend to query Elastic Search (if you are using the ElasticSearch exporter) for such information. I wouldn’t expect the Brokers to give you such information.