public void run ( ) throws ActionException { try { perform ( ) ; try { cleanup ( ) ; // Ignore exception } catch ( ActionException e ) { } lastError = null ; } catch ( ActionException e ) { // (perform: has already backed out whatever it did) lastError = e ; throw e ; } }
Performs all the actions in order . If any action fails backs out the previously performed actions in reverse order . If the actions succeeded cleans them up in reverse order . The lastError property is set to the exception thrown by the failed perform block . The failedStep property is set to the index of the failed perform block .