opened
npepinpe
username_0
## Description

As part of #6175, we will need a way to walk the scope hierarchy of variable scopes in order to properly merge variable documents, and this will be done outside of the `VariableState`. The simplest solution is simply to expose `getParentScopeKey` which returns either the parent scope key, or `NO_PARENT` if there is none.

If we end up walking this hierarchy a lot, then we could always introduce a more complex abstraction, but this is fine for now.

## Related issues

<!-- Which issues are closed by this PR or are related -->

related to #6175 
blocked by #6446

## Definition of Done

_Not all items need to be done depending on the issue and the pull request._

Code changes:
* [x] The changes are backwards compatibility with previous versions
* [ ] If it fixes a bug then PRs are created to [backport](https://github.com/zeebe-io/zeebe/compare/stable/0.24...develop?expand=1&template=backport_template.md&title=[Backport%200.24]) the fix to the last two minor versions. You can trigger a backport by assigning labels (e.g. `backport stable/0.25`) to the PR, in case that fails you need to create backports manually.

Testing:
* [x] There are unit/integration tests that verify all acceptance criterias of the issue
* [x] New tests are written to ensure backwards compatibility with further versions
* [x] The behavior is tested manually
* [ ] The change has been verified by a QA run
* [ ] The impact of the changes is verified by a benchmark 

Documentation: 
* [ ] The documentation is updated (e.g. BPMN reference, configuration, examples, get-started guides, etc.)
* [ ] New content is added to the [release announcement](https://drive.google.com/drive/u/0/folders/1DTIeswnEEq-NggJ25rm2BsDjcCQpDape)
Provide a way to get the parent scope key of a variable scope
issue
created
npepinpe
username_0
This PR currently includes commits from #6446 as it builds on top of it - it'll probably be easier to review once that one is merged.
comment
created
npepinpe
username_0
bors r+
comment