AnsweredAssumed Answered

Project layout for business archives

Question asked by tombaeyens on Dec 23, 2010
Latest reply on Mar 10, 2012 by nico1
In the past, I always saw executable processes always inside the project where developers created their own business application.  I think it becomes a lot easier to guide developers when we use the convention and advice that developers should use a single project for every business archive that they build.  Then still all the Java integrations remain as valid as before.  But the ant and maven integrations will be simpler to provide and understand.  Also it will be easier to embed such a project layout in various (multiple!) scenarios/styles of collaboration around process authoring.

Here are some ideas.  Not all very structured or exhaustive, but I hope they are a good start for the discussion.

Proposed project layout:

+ src/main/java –> contains delegation classes that will be deployed in the business archive (future feature)
+ src/main/resources –> .bpmn20.xml process files and other resources like forms and rules
+ build.xml
|   + target 'bar' creates the business archive
|   + target 'deploy' should deploy the business archive to the configured deployment location
+ pom.xml –> alternative for the build.xml file for developers prefering maven. 
     + 'mvn clean install' builds the business archives and deploys it to the local repo
     + 'mvn clean deploy' should deploy it to the configured deployment location

Deployment locations could be
* Activiti Engine
* Some versioned file based repository manged by Activiti Cycle from which sys admins can pick it up
* Maven repository in the case of maven

In case of ant based building, the Activiti Engine lib dependencies still need to be fetched from somewhere.  Setup contains the capability to copy the libs in libs folders as it's done with the examples projects.  It's based on the .txt files containing all the dependencies.   That could be inspiration for the ant based approach.

For example (just thinking/dreaming out loud):
Activiti Designer could have a new BPMN 2.0 business archive project.  First choice is ant or maven.  Suppose we select ant. Then a new screen presents the optional features for which library dependencies have to be included like groovy, jpa, cxf etc.  By default all checkboxes should be checked to minimize troubles for beginners.  Only more advanced developers may want to minimize the lib dependencies.    For the Designer to be able to generate the project and fetch the dependencies, it would also need a configuration property that points to an Activiti installation from which the dependencies .txt files and the library jars are used.

This would imply that we also have to offer the same wizard in e.g. Activiti KickStart as we also have to let people choose the build tool and where they want to create their new project.

Outcomes