The outcome is automatically saved in game variable 1 without you setting a battle rule.
Though a battle will automatically return false if the player loses or draws, and true otherwise, so you really only need to do the battle in the conditional branch.
Script: setBattleRule("canLose")
Conditional Branch: Script: TrainerBattle.start(:RIVALF, "Dawn", 1)
Text: Wow, you're pretty good.
Else
Text: Wow, you're pretty bad.
Branch End
Control Self Switch: A=ON
Script: pbTrainerEnd