*/
public class _01_ExecutionAndThreadTest extends TestCase {
public void testExecutionAndThread() {
ProcessDefinition processDefinition = ProcessFactory.build("automatic")
.node("wait 1").initial().behaviour(new WaitState())
.transition().to("automatic 1")
.node("automatic 1").behaviour(new Display("one"))
.transition().to("wait 2")
.node("wait 2").behaviour(new WaitState())
.transition().to("automatic 2")
.node("automatic 2").behaviour(new Display("two"))
.transition().to("automatic 3")
.node("automatic 3").behaviour(new Display("three"))
.transition().to("automatic 4")
.node("automatic 4").behaviour(new Display("four"))
.transition().to("wait 3")
.node("wait 3").behaviour(new WaitState())
.done();
Execution execution = processDefinition.startExecution();
assertEquals("wait 1", execution.getNode().getName());
execution.signal();