Hi @tomorrow,
If you need to access a local variable outside of the execution it was used in, you can use output variable mapping (see here https://docs.camunda.org/manual/7.10/user-guide/process-engine/variables/#input-output-variable-mapping).
Event listeners have access to the execution they are attached to, so they can access the local variables directly through the execution object. It is also possible to correlate messages through Execution/Task Listeners and Delegates. You can see one example here Use a connector in a Listener.
Best,
Nikola