Index: flexoentity/flexo_entity.py
===================================================================
--- flexoentity/flexo_entity.py	(revision a3227e7598822ec477389a3e28be46ca64438b89)
+++ flexoentity/flexo_entity.py	(revision 52ccac6edb8c3ce7f8efacf668054f13855c8011)
@@ -247,4 +247,5 @@
         # special case: marking obsolete
         if target_state == EntityState.OBSOLETE:
+            self.flexo_id = FlexOID(self.flexo_id.flexo_id[:-1] + "O") 
             self.state = target_state
             return
@@ -334,4 +335,10 @@
 
     def obsolete(self):
+        allowed = self.allowed_transitions()
+        if "OBSOLETE" not in allowed:
+            raise ValueError(
+                f"Illegal state transition: {self.state.name} -> OBSOLETE. "
+                f"Allowed: {', '.join(allowed) or 'none'}"
+            )
         if self.state != EntityState.OBSOLETE:
             self._transition(EntityState.OBSOLETE)
@@ -387,5 +394,5 @@
         if new_state == EntityState.APPROVED:
             self.approve()
-        elif new_state == EntityState.SIGNED:
+        elif new_state == EntityState.APPROVED_AND_SIGNED:
             self.sign()
         elif new_state == EntityState.PUBLISHED:
@@ -394,3 +401,3 @@
             self.obsolete()
         else:
-            raise RuntimeError(f"No handler for state transition to {new_state.name}")
+            raise RuntimeError(f"No handler for state transition to {new_state}")
