try {
rulesRepository.loadState( name ).remove();
rulesRepository.save();
} catch ( RulesRepositoryException e ) {
throw new DetailedSerializationException( "Unable to remove status. It is probably still used (even by archived items).",
e.getMessage() );
}
}