operation flowchart::Node createTransitionTo(transitionName : String, targetName : String) { | |
var flowchart = Flowchart.all.first(); | |
var target = new Model!flowchart::Action; | |
target.name = targetName; | |
flowchart.nodes.add(target); | |
var transition = new Model!flowchart::Transition; | |
transition.name = transitionName; | |
transition.source = self; | |
transition.target = target; | |
flowchart.transitions.add(transition); | |
} |