Index: workflow.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/workflow/workflow.module,v
retrieving revision 1.83
diff -u -p -r1.83 workflow.module
--- workflow.module	1 Jan 2009 21:09:16 -0000	1.83
+++ workflow.module	5 Apr 2009 12:00:23 -0000
@@ -538,12 +538,13 @@ function workflow_execute_transition($no
   $type = node_get_types('name', $node->type);
   watchdog('workflow', 'State of @type %node_title set to @state_name', array('@type' => $type, '%node_title' => $node->title, '@state_name' => $state_name), WATCHDOG_NOTICE, l('view', 'node/' . $node->nid));
 
+  // Clear any references in the scheduled listing.
+  db_query('DELETE FROM {workflow_scheduled_transition} WHERE nid = %d', $node->nid);
+
   // Notify modules that transition has occurred. Actions should take place
   // in response to this callback, not the previous one.
   module_invoke_all('workflow', 'transition post', $old_sid, $sid, $node);
 
-  // Clear any references in the scheduled listing.
-  db_query('DELETE FROM {workflow_scheduled_transition} WHERE nid = %d', $node->nid);
 }
 
 /**
@@ -1508,4 +1509,4 @@ function workflow_token_list($type = 'al
   }
 
   return $tokens;
-}
\ No newline at end of file
+}
