cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Process Definitions in Code?

glgrahamjr
Champ in-the-making
Champ in-the-making
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.
1 REPLY 1

trademak
Star Contributor
Star Contributor
Hi,

You can develop process definitions in Java. But this is not the promoted way for using Activiti.
But under the hood, every BPMN 2.0 XML file gets translated into a Java domain model. So you could also use the Java domain model directly.

Best regards,