Camunda 8 - Set global variable

Hi Camunda community,

I am using Camunda desktop modeler to make bpmn diagrams.
I want to add variables that can be read on the operate application at the end of the process.
I tried adding outputs on my end event :slight_smile:


But it seems that the variable named eligibility is in local scope and then is not visible at the end of the process according this documentation : Variables | Camunda 8 Docs

Can you help me with this issue ?
Thanks a lot.

EDIT : The only way I found is to create a worker that takes inputs and send it to zeebe as global variables

Blockquote
@ZeebeWorker(type = “setInputsInResponse”, autoComplete = true)
public void setInputsInResponse(final ActivatedJob job) {
log.info("Invoking setInputsInResponse with variables: " + job.getVariablesAsMap());
zeebeClient.newSetVariablesCommand(job.getElementInstanceKey()).variables(job.getVariablesAsMap()).send().join();
}

1 Like

Good workaround for now. How about opening a GitHub issue in the Zeebe repository for this as a feature request?