I am very new to BPM in general and Activiti in particular, although I have been developing in Spring for about 4 years. I am looking for an open source workflow framework to replace homegrown workflow functionality. Is it possible to define process definitions in java code? I need to allow end users to create workflows on the fly, ie, create a parent task with as many subtasks as they want, as well as nest them based on their business needs. They need to do this via a web application as opposed to via a separate designer such as eclipse plugin. They then need to be able to create instances and keep track of what is completed, etc. From playing with the sample Activiti Explorer and reading thru the documentation, it looks like the process definitions themselves are predefined and deployed, via xml configuration for example. Unless I missed something or it just wasn't included in the sample, it didn't appear that one could create a process definition (as opposed to an instance) on the fly and persist it in the repository. Please let me know if I am understanding this correctly or missing something. Thanks.