Setting variables in anim graph instead of event graph

Is there a way to set variables in anim graph instead of event graph?
In a lot of cases, you want to set variables at the start or end of animations.
So it will be a lot better and cleaner if we can set variables in anim graphs within transition rules.