Hello Scripting Gurus!

A small question here about scripting, I went through some Scripting guides here, but I am affraid I am not catching the essence of the reason of scripting...

So I thought to ask directly..

Is it possible to make some behavior happen following a presice action?

For instance, would it be possible to have some province rebel, trigered by the conquest by a certain faction of another province?

Exemple:

lets say that the germans have advanced in to Britain, and captured a couple of provinces, but not the Britons Capital, in subsequent turns the germans advance and lay siege and then capture the Capital of the Britons (the britons still have another province so this does not eliminate their faction)...yet the initially captured Provinces Rebel against their new masters in a last ditch effort to overthrow the germans from their territory and outraged by the capture of their Capital city...

Is it possible to script triggers like that?