I find i write a lot of boiler code and functions when doing getVariable…
Is there a single function in camunda that allows you to do getVariable and apply conditions that ensure the variable exists and is not null?
something like execution.getVariable('myVarName', true) which true is the boolean that says that it must exist and cannot be null.
I’m often in the same boat as you - i’ve got a bunch a of code dealing with null pointers when it would be much easier if the engine told me the variable exists. So for most of my use cases “not null” would do the trick.