How to get the current version of a node? I programmaly want to set the current version of a node to a status in workbench "needs_review" however the current version of the node is not the published version of the node.

$vid  
5000 = Published 
4999 = Current revision


How to get the versionid of a node which contains the current version?

I tried several and I guess:

$vid = revisioning_get_latest_revision_id ($nodeid)
$node = node_load ($nodeid, $vid) 


but this is of course giving an error as a answer as I'm using D7, the function revisioning_get_latest_revision_id cannot be found. 

I also saw https://api.drupal.org/api/drupal/modules%21node%21node.module/function/node_revision_list/7.x
But do not understand how the get the current revision of the node.

Any suggestions?
For those who need it. It is included in the node structure under value:

$node-&gt;workbench_moderation['current']-&gt;vid