Activiti/Activiti — pull request #271 by flexik (2014-05-15 01:15:43+00:00)
Title: SetProcessDefinitionVersionCmd Nested sub executions migration fix

`SetProcessDefinitionVersionCmd` class does not work correctly on processes with nested sub executions.

When setting new version of a process instance, only **direct sub executions** of the instance root execution will get their version updated. All other executions belonging to the same process instance will keep their old process definition version.

This is caused by using `findChildExecutionsByParentExecutionId` query method in `SetProcessDefinitionVersionCmd` class which returns only direct descendants of a given execution.

The fixed version in this pull request replaces `findChildExecutionsByParentExecutionId` call by `findChildExecutionsByProcessInstanceId`, which returns **all** descendants of a root execution instead of just direct ones. An unit test covering this issue is also added.