Do the Using plain Java to do BPM on Activiti In Action chapter 4.