Why node object loses data after using workbench_moderation_moderate? I'm using Workbench Moderation module because it matches my needs. I have a front-end form that initiate the node with some fields. Editor should review the node and fill all the required fields remaining. 

So, I need to make sure that all fields are now filled with data then the state should be changed to Needs Review. 

I implemented hook_workbench_moderation_transition to trigger the state change. If the next state was Needs Review, then I would make sure that all required fields were filled with data otherwise I would change the state back to the previous one and redirect to the node edit form.

What I've done so far

    function workflow_handler_workbench_moderation_transition($node, $previous_state, $new_state){
        if ($new_state == 'needs review'){
          //check if node was not reviewed before , then redirect to form
          $instatnces = field_info_instances('node',$node-&gt;type);
          //should check first if conditional_fields module is existed
          $CFS = conditional_fields_load_dependencies('node',$node-&gt;type);
          foreach ($instatnces as $key =&gt; $field_options) {
            $field = field_get_items('node', $node, $key);
            if ($field_options['required'] &amp;&amp; !$field &amp;&amp; !array_key_exists($key, $CFS['dependents'])) {
               //set workbench state to previous one
               workbench_moderation_moderate($node, $previous_state);
               drupal_set_message(t('Please make sure that all required fields has been reviewed'),'error');
               $url = url("node/$node-&gt;nid/edit");
               header("Location:$url");
               drupal_exit();
            }
         }
      }
   }


Problem exists when using workbench_moderation_moderate in the context above. For some reason, when I got redirected to the form to edit, and after saving, my edits were not saved on the node object and so if I opened the edit form again, I couldn't find my edits. Any ideas?
The Problem was that workbench_moderation_moderate() calls internally hook_workbench_moderation_transition() so I decided to do it with another technique that should cover the two ways that workbench moderation uses to change the state

First way to be covered, the links that exist in workbench moderation back end views. I implemented hook_menu_alter to intercept the request from those links to add my custom logic.

function my_custom_logic($node, $state){
   //add your logic here
}

/**
* Implements hook_menu_alter()
*/
function workflow_handler_menu_alter(&amp;$items){
  $items["node/%node/moderation/%/change-state/%"] = array(
    'page callback' =&gt; 'workflow_handler_moderate_callback',
    'title' =&gt; 'Change moderation state',
    'page arguments' =&gt; array(1, 5),
    'load arguments' =&gt; array(3),
    'access callback' =&gt; 'workflow_handler_moderate_access',
    'access arguments' =&gt; array(1, 5),
    'type' =&gt; MENU_CALLBACK,
  );
}

function ei_workflow_handler_moderate_access($node, $state){
  return _workbench_moderation_moderate_access($node, $state);
}

function workflow_handler_moderate_callback($node, $state){
  my_custom_logic($node, $state);
  workbench_moderation_moderate_callback($node, $state);
}


Second way to be handled, the form that workbench adds in every node details page. I implemented hook_form_alter to add my submit handler before workbench moderation one and I added my logic again there.

/**
* Implements hook_form_alter()
*/
function ei_workflow_handler_form_alter(&amp;$form, &amp;$form_state,$form_id){
    if($form_id == 'workbench_moderation_moderate_form'){
      $form['submit']['#submit'][] ='my_custom_logic_handler';
    }
}

function my_custom_logic_handler ($form, &amp;$form_state) {
  my_custom_logic($form_state['values']['node'], $form_state['values']['state']);
}


Hopefully this helps anyone who encounter that issue in the future.