I'm still a bit of a novice with DF and had my first real experience with Fun the other day. I working away building some beds, setting some traps, farming, etc when a horde of undead goblins appeared and lumbered toward my fortress. A few were caught in cage traps, some were chewed up by weapon traps but they were too much and entered my fortress.
As soon as they were inside almost ALL of my dwarves rushed them and started attacking which, as you can imagine, ended poorly.
Next time I'm attacked how can I prevent my worker dwarves from trying to attack? Was is just because I lacked much of a military? How do you keep your dwarves away from the attackers?