Not by any means, since many things might be and have to be weighted before such an important decision that interferes with so many lives.
It is dependent on the force of the assault just as the intensity of the assaulting country.
Also, it is important to remember that quite a few nations have been assaulted and actually never battled back. In fact, surrendering has been proven an option that might actually save more lives in many situations. Specially if you consider that the country that is assaulting might be the more dominant when it comes to be about fire power.
There is also the option of trying to punish an specific responsible by it or using of sanctions when it's the case of no human casualties and so on.