RuntimeService.getVariables(String, Collection) retrieves more than the specified variables

Description

Documentation for the method RuntimeService.getVariables(String, Collection) states that the specified variable names will be retrieved. However, the implementation returns all the variables, regardless of the specified variable names.

Inspecting the source code for org.activiti.engine.impl.cmd.GetExecutionVariablesCmd, we notice that field 'variableNames' is not used.

This can be reproduced by simply invoking RuntimeService.getVariables(String, Collection) with a proper subset of the existing variables in a given process instance.

See: http://activiti.org/javadocs/org/activiti/engine/RuntimeService.html#getVariables(java.lang.String,%20java.util.Collection)

Environment

None

Assignee

Tijs Rademakers

Reporter

Jo_o Loureiro

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure