ActivityInstanceVerification verifier = new ActivityInstanceVerification();
PvmProcessDefinition processDefinition = new ProcessDefinitionBuilder()
.createActivity("start")
.initial()
.behavior(new Automatic())
.executionListener(ExecutionListener.EVENTNAME_END, verifier)
.transition("fork")
.endActivity()
.createActivity("fork")
.behavior(new ParallelGateway())
.executionListener(ExecutionListener.EVENTNAME_END, verifier)
.transition("a1")
.transition("a2")
.endActivity()
.createActivity("a1")
.behavior(new Automatic())
.executionListener(ExecutionListener.EVENTNAME_END, verifier)
.transition("join")
.endActivity()
.createActivity("a2")
.behavior(new Automatic())
.executionListener(ExecutionListener.EVENTNAME_END, verifier)
.transition("join")
.endActivity()
.createActivity("join")
.behavior(new ParallelGateway())