c# statechart (boost like).