* +-----+ +-----+ +-------+ +------+ +------+
* | one |-->| two |-->| three |-->| four |--> | five |
* +-----+ +-----+ +-------+ +------+ +------+
*/
public void testCombinationOfWaitStatesAndAutomatics() {
PvmProcessDefinition processDefinition = new ProcessDefinitionBuilder()
.createActivity("start")
.initial()
.behavior(new Automatic())
.transition("one")
.endActivity()
.createActivity("one")
.behavior(new WaitState())
.transition("two")
.endActivity()
.createActivity("two")
.behavior(new WaitState())
.transition("three")
.endActivity()
.createActivity("three")
.behavior(new Automatic())
.transition("four")
.endActivity()
.createActivity("four")
.behavior(new Automatic())
.transition("five")
.endActivity()
.createActivity("five")
.behavior(new End())
.endActivity()
.buildProcessDefinition();
PvmProcessInstance processInstance = processDefinition.createProcessInstance();
processInstance.start();
PvmExecution activityInstance = processInstance.findExecution("one");
assertNotNull(activityInstance);
activityInstance.signal(null, null);