In my book "Activiti in Action" from Manning publications –> http://www.manning.com/rademakers2 this is explained. In chapter 1, which you can download for free, a example with an embedded setup is included. In chapter 3, which will come available in a short time, a lot more about different setups is explained. You can also look at Google code for all the book's code examples –> http://code.google.com/p/activitiinaction/