Index: cronjobs/workflow.php
===================================================================
--- cronjobs/workflow.php	(revision 22662)
+++ cronjobs/workflow.php	(working copy)
@@ -39,6 +39,9 @@
 require_once( "lib/ezutils/classes/ezsession.php" );
 
 require_once( "lib/ezutils/classes/ezdebug.php" );
+
+$db = eZDB::instance();
+
 $workflowProcessList = eZWorkflowProcess::fetchForStatus( eZWorkflow::STATUS_DEFERRED_TO_CRON );
 //var_dump( $workflowProcessList  );
 //$user = eZUser::instance( 14 );
@@ -50,6 +53,8 @@
 $statusMap = array();
 foreach( $workflowProcessList as $process )
 {
+    $db->begin();
+
     $workflow = eZWorkflow::fetch( $process->attribute( "workflow_id" ) );
 
     if ( $process->attribute( "event_id" ) != 0 )
@@ -97,12 +102,16 @@
         if ( is_null( $bodyMemento ) )
         {
             eZDebug::writeError( $bodyMemento, "Empty body memento in workflow.php" );
+            $db->commit();
             continue;
         }
         $bodyMementoData = $bodyMemento->data();
         $mainMemento = $bodyMemento->attribute( 'main_memento' );
         if ( !$mainMemento )
+        {
+            $db->commit();
             continue;
+        }
 
         $mementoData = $bodyMemento->data();
         $mainMementoData = $mainMemento->data();
@@ -118,6 +127,7 @@
         $process->removeThis();
     }
 
+    $db->commit();
 }
 if ( !$isQuiet )
 {
