Activiti dynamic process example used in blog-post: http://stacktrace.be/blog/2013/03/dynamic-process-creation-and-deployment-in-100-lines/
A simple example on how to use Activiti 5.12 to create a process in code, deploy it, start it, test it and create a process image in only 100 lines of code...