If you don't have the training, run and hide. If you do, communicate with the police.
Several years ago a young man became paralyzed because he tried to engage a mall shooter in the Seattle area. He should have run and hid.
In another instance an off duty police officer made sure his wife was on the phone with the responders, telling them where he was and what he was wearing.
Subjects like this are loaded with "ifs".
BTW the news mentioned that employees were trained to respond to this type of situation and that might have saved lives.