In Usul al-Kafi Vol. 1 (available from WOFIS in Iran), Imam 'Ali (as) explains that the decree is not finalised until the actual moment that it is brought into existence. Up until that time, there is room for the decree to be changed, or withheld. It is a key teaching from the Ahl al-Bayt (as) that you can have a living and dynamic relationship with Allah (swt) and that du'a, as well as other actions, can alter what is decreed. I know of the expression in the Middle East where they say 'the name of your spouse is written on your forehead', which sounds like an unchangeable destiny, but through du'a you may change that name.