Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/batching.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/batching.py	(revision 8335)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/batching.py	(revision 8336)
@@ -32,5 +32,5 @@
 from waeup.kofa.applicants.interfaces import (
     IApplicantsContainer, IApplicant, IApplicantUpdateByRegNo)
-from waeup.kofa.applicants.workflow import  IMPORTABLE_STATES
+from waeup.kofa.applicants.workflow import  IMPORTABLE_STATES, CREATED
 
 class ApplicantsContainerProcessor(BatchProcessor):
@@ -307,2 +307,14 @@
                 conv_dict['application_number'] = IGNORE_MARKER
         return errs, inv_errs, conv_dict
+
+    def checkUpdateRequirements(self, obj, row, site):
+        """Checks requirements the object must fulfill when being updated.
+
+        This method is not used in case of deleting or adding objects.
+
+        Returns error messages as strings in case of requirement
+        problems.
+        """
+        if obj.state == CREATED:
+            return 'Applicant is blocked.'
+        return None
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_applicant_data.csv
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_applicant_data.csv	(revision 8335)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_applicant_data.csv	(revision 8336)
@@ -3,2 +3,3 @@
 2345,dp2011,1002,Aaren,Finau,1990-01-03,xx@yy.zz,CERT1,m,Claus,
 ,dp2011,1003,Aaren,Berson,1990-01-04,xx@yy.zz,CERT1,m,Alfons,
+4567,dp2011,1004,Simon,Star,1990-01-05,xx@yy.zz,CERT1,m,Uwe,
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_applicant_data_update.csv
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_applicant_data_update.csv	(revision 8335)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_applicant_data_update.csv	(revision 8336)
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_applicant_data_update2.csv
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_applicant_data_update2.csv	(revision 8335)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/sample_applicant_data_update2.csv	(revision 8336)
@@ -1,4 +1,5 @@
-applicant_id,reg_number,firstname,middlename
-dp2011_1234,,Aaren,XXX
-,6666,Alfons,XXX
-,1003,Abraham,XXX
+applicant_id,reg_number,firstname,middlename,state
+dp2011_1234,,Aaren,XXX,
+,6666,Alfons,XXX,
+,1003,Abraham,XXX,
+,1004,Vertan,,
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_batching.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_batching.py	(revision 8335)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_batching.py	(revision 8336)
@@ -25,4 +25,5 @@
 import unittest
 import grok
+from hurry.workflow.interfaces import IWorkflowState
 from zope.component.hooks import setSite, clearSite
 from zope.component import createObject
@@ -39,4 +40,5 @@
 from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
 from waeup.kofa.interfaces import IBatchProcessor, IUserAccount
+from waeup.kofa.applicants.workflow import CREATED
 
 
@@ -285,5 +287,5 @@
         self.assertEqual(num_warns,0)
         keys = self.app['applicants']['dp2011'].keys()
-        assert len(keys) == 4
+        assert len(keys) == 5
         container = self.app['applicants']['dp2011']
         assert  container.__implemented__.__name__ == (
@@ -353,5 +355,4 @@
         self.assertEqual(container['2345'].reg_number, '6666')
         logcontent = open(self.logfile).read()
-
         # Logging message from updateEntry,
         # reg_number is locator
@@ -364,16 +365,20 @@
             'firstname=Alfons, applicant_id=dp2011_2345' in
             logcontent)
-
         shutil.rmtree(os.path.dirname(fin_file))
 
         # Now we import another file which clears all middlename attributes
         # and uses the new reg_number as locator. This test also checks
-        # if the catalog has been informed about the reg_no change.
+        # if the catalog has been informed about the reg_no change and if
+        # applicants in state created are really blocked.
+        IWorkflowState(container['4567']).setState(CREATED)
         num, num_warns, fin_file, fail_file = self.processor.doImport(
             self.csv_file_update2, APPLICANT_HEADER_FIELDS_UPDATE2, 'update')
-        #content = open(fail_file).read()
-        #print content
-        self.assertEqual(num_warns,0)
+        failcontent = open(fail_file).read()
+        self.assertTrue('Applicant is blocked' in failcontent)
+        self.assertEqual(num_warns,1)
+        # Middlename is cleared.
         assert container['1234'].middlename is None
+        # Firstname of applicant in state created isn't changed.
+        self.assertEqual(container['4567'].firstname, 'Simon')
         shutil.rmtree(os.path.dirname(fin_file))
 
@@ -386,9 +391,7 @@
         self.assertEqual(num_warns,0)
         logcontent = open(self.logfile).read()
-
         # Logging message from handle_applicant_transition_event
         self.assertTrue(
             'dp2011_1234 - Applicant record removed' in
             logcontent)
-
-        shutil.rmtree(os.path.dirname(fin_file))
+        shutil.rmtree(os.path.dirname(fin_file))
