Perhaps changing the scope of the success flag (or introduce another flag), and call `rollback()` if we fail to `createTransactionCommands()`.