For me these problems come down to two cases.
By this I mean that things can be executed in any order. So the event driving changes can happen at any stage. The state of A could be updated at any time regardless of the state of any children
For this case I always end up with horrible code that keeps copies of the parent for each level and you work your way up the chain till you get to A. Then you have a none re-entrant method that executes afterwards to actually do whatever this mess is supposed to do.
needs extra pass
I always end up with a static state vector in this case.
The code you have above is close to what I normally end up with, but is very basic.
I normally end up with a lot more data in the state vector. A stack of old states (or partial states) to make it easy to go backwards. A mutex to make it thread safe, mainly because I am paranoid, but what's wrong with being paranoid. And all output data so whatever is using the system can grab a single pointer to work with.
Simple to work with for external code
Easy to debug
Liable to code bloat. I hate the words "wouldn't it be cool if...."
Not very memory efficient
Whole tree needs updating every pass
So I hope that gives you something to think about.