Index: main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/__init__.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/__init__.py	(revision 6359)
+++ main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/__init__.py	(revision 6374)
@@ -1,5 +1,6 @@
 # Make this a package.
 from waeup.sirp.accesscodes.accesscodes import (
-    get_access_code, invalidate_accesscode)
+    get_access_code, invalidate_accesscode, disable_accesscode,
+    reenable_accesscode)
 
 # Public API of this submodule
@@ -7,4 +8,6 @@
     get_access_code,
     invalidate_accesscode,
+    disable_accesscode,
+    reenable_accesscode,
     ]
 
Index: main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscodes.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscodes.py	(revision 6359)
+++ main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscodes.py	(revision 6374)
@@ -6,5 +6,5 @@
 from BTrees.OIBTree import OIBTree
 from datetime import datetime
-from hurry.workflow.interfaces import IWorkflowInfo
+from hurry.workflow.interfaces import IWorkflowInfo, InvalidTransitionError
 from random import SystemRandom as random
 from waeup.sirp.interfaces import IWAeUPSIRPPluggable
@@ -12,5 +12,5 @@
     IAccessCode, IAccessCodeBatch, IAccessCodeBatchContainer
     )
-from waeup.sirp.accesscodes.workflow import DISABLED
+from waeup.sirp.accesscodes.workflow import DISABLED, INITIALIZED
 
 class ManageACBatches(grok.Permission):
@@ -448,19 +448,50 @@
     return code
 
+def _fire_transition(info, arg, toward=False):
+    try:
+        if toward:
+            info.fireTransitionToward(arg)
+        else:
+            info.fireTransition(arg)
+    except InvalidTransitionError:
+        return False
+    return True
+
 def invalidate_accesscode(access_code):
+    """Invalidate AccessCode denoted by string ``access_code``.
+
+    The access code that belongs to the passed string must exist.
+
+    Fires an appropriate transition to perform the task.
+
+    Returns ``True`` if the ac was invalidated, ``False`` else.
+    """
     ac = get_access_code(access_code)
     info = IWorkflowInfo(ac)
-    info.fireTransition('use')
-    return
+    return _fire_transition(info, 'use')
 
 def disable_accesscode(access_code):
+    """Disable AccessCode denoted by string ``access_code``.
+
+    The access code that belongs to the passed string must exist.
+
+    Fires an appropriate transition to perform the task.
+
+    Returns ``True`` if the ac was disabled, ``False`` else.
+    """
     ac = get_access_code(access_code)
     info = IWorkflowInfo(ac)
-    info.fireTransitionToward(DISABLED)
-    return
+    return _fire_transition(info, DISABLED, toward=True)
 
 def reenable_accesscode(access_code):
+    """Reenable AccessCode denoted by string ``access_code``.
+
+    The access code that belongs to the passed string must exist.
+
+    Fires an appropriate transition to perform the task.
+
+    Returns ``True`` if the ac was reenabled, ``False`` else.
+    """
     ac = get_access_code(access_code)
     info = IWorkflowInfo(ac)
-    info.fireTransition('reenable')
-    return
+    return _fire_transition(info, 'reenable')
Index: main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/tests/test_accesscodes.py
===================================================================
--- main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/tests/test_accesscodes.py	(revision 6359)
+++ main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/tests/test_accesscodes.py	(revision 6374)
@@ -29,5 +29,5 @@
 from waeup.sirp.accesscodes.accesscodes import (
     AccessCodeBatch, get_access_code, invalidate_accesscode,
-    disable_accesscode)
+    disable_accesscode, reenable_accesscode)
 
 class AccessCodeHelpersTests(FunctionalTestCase):
@@ -89,6 +89,21 @@
     def test_invalidate_accesscode(self):
         assert self.ac1._invalidation_date is None
+        result = invalidate_accesscode('APP-1-11111111')
+        assert self.ac1._invalidation_date is not None
+        assert result is True
+
+    def test_invalidate_used_accesscode(self):
         invalidate_accesscode('APP-1-11111111')
-        assert self.ac1._invalidation_date is not None
+        inv_date = self.ac1._invalidation_date
+        result = invalidate_accesscode('APP-1-11111111')
+        assert result is False
+        assert self.ac1._invalidation_date == inv_date
+
+    def test_invalidate_disabled_accesscode(self):
+        # disabled acs cannot be invalidated.
+        disable_accesscode('APP-1-11111111')
+        result = invalidate_accesscode('APP-1-11111111')
+        assert result is False
+        assert self.ac1._disabled is True
 
     def test_disable_accesscode_unused(self):
@@ -102,2 +117,13 @@
         disable_accesscode('APP-1-11111111')
         assert self.ac1._disabled is True
+
+    def test_reenable_accesscode(self):
+        disable_accesscode('APP-1-11111111')
+        result = reenable_accesscode('APP-1-11111111')
+        assert result is True
+        assert self.ac1._disabled is False
+
+    def test_reenable_accesscode_enabled(self):
+        result = reenable_accesscode('APP-1-11111111')
+        assert result is False
+        assert self.ac1._disabled is False
