Since there is some confusion on how to use the query service depending on if you are connected to a system organization or a specific one and also because of a change of behavior of VclEntityType in the 5.1 plug-in I am uploading this version that should work in any case. It also sorts the results in ascending order.
Disclaimer: These samples workflows are provided AS IS and are not considered production quality and are not officially Supported. Use at your own risk. Feel free to modify and expand and share your contributions.