Problem:
When
runtimeService.getVariables(executionId, variableNames)
is called then all variables of the execution are fetched from the database. The filtering of the given variable names is applied afterward. This behavior can be less efficient when the execution has many variables but we only query for few of them.
AT:
- reduce the overhead if we query only for few variables