动态创建transition 和task
public Transition createTransition(Node fromNode,Node toNode) { Transition transition = new Transition("tranName"); transition.setTo(toNone); fromNode.addLeavingTransition(transition); return transition; }