How to get Extension Property via Expression

I’m trying to add some “global variables” using the Extension Properties.

grafik

But how can I access them using BPMN Expressions?
Is there any method like ${expression.getExtensionElement("someProperty")}?

Is the use of the extension properties the right way to set some global variables?
We setup script tasks as http-connectors and globally we need some information like the API-KEy etc.

This might not be the best way to define global variables, extensions like this are limited to the element themselves and it’s quite hard to get access to them from other parts of the process.

Might be easier to just use an execution listener that has a script that runs something like
execution.setVariable("somePro", "Value")
The resulting variable would be global