*/
public class _02_ExternalDecisionTest extends TestCase {
public void testExternalTransitionDecision() {
ProcessDefinition processDefinition = ProcessFactory.build()
.node("initial").initial().behaviour(new WaitState())
.transition().to("creditRate?")
.node("creditRate?").behaviour(new ExternalSelection())
.transition("good").to("a")
.transition("average").to("b")
.transition("bad").to("c")
.node("a").behaviour(new WaitState())
.node("b").behaviour(new WaitState())
.node("c").behaviour(new WaitState())
.done();
Execution execution = processDefinition.startExecution();
execution.signal();
assertEquals("creditRate?", execution.getNode().getName());