public ReturnCode rollback ( ) { while ( ! history . isEmpty ( ) ) { final Action action = ( Action ) history . pop ( ) ; final ReturnCode ret = action . execute ( ) ; if ( ret . getCode ( ) != 0 ) { return ret ; } } return ReturnCode . OK ; }
Attempts to undo changes in reverse order of actions taken ;