Drupal 7 Webform and Workbench Moderation

On one of our projects we had to enable revisions for webform node. By default webform node revisions are not available and supported. We didn't need revisions related to webform section of node we just needed to give editors ability to change fields values and create multiple revisions of node (not related to submissions data). Along with webform was used Workbench moderation module. When we enabled webform moderation we was not able to publish webform node. Only given below code snippet helped us.

 * Implements hook_node_update().
function mymodule_node_update($node) {
  if ($node->type == 'webform') {
    // Add workbench moderation state.
    $node->workbench_moderation['updating_live_revision'] = 1;

// Without this code you won't be able to publish the node.

I Hope it will save time for someone.