This page describes how to get started if you want to build Activiti Designer yourself or if you want to extend Activiti Designer's features. It assumes you have a working knowledge of Eclipse, Maven and RCP development.
- Start by downloading a Helios version of Eclipse for RCP and RAP Developers from here: http://www.eclipse.org/downloads/
- Download and install Maven 3 from here: http://maven.apache.org/download.html . Using Maven 2.x will not work, so make sure you have a compliant version. Commands listed further on will assume that you have the mvn command linked to Maven 3. Make sure your Maven settings are such, that Maven can access the Internet to access public repositories and download dependencies
- Add the Eclipse Modelling Framework (EMF) SDK
- Add Eclipse Graphiti SDK 0.7.1 from update site http://download.eclipse.org/graphiti/updates/0.7.1. We haven't moved to the new 0.8.x release of Graphiti yet and you may have trouble using it, so for the moment stick with 0.7.1
- Add a team provider for Subversion, such as Subversive
- Add the following location as source code repository: http://svn.codehaus.org/activiti/projects/designer/
As you can see, there are quite a number of projects in this tree. You will need to have all of them in your Eclipse workspace to build Designer yourself. It's important that you perform a checkout of all of these projects as top level projects in your workspace. Obviously, you can do without the examples folder, but you need the other projects.
- Checkout all of the folders in the source control location as top level Eclipse projects.
- Open a console and navigate to the directory of your Eclipse workspace and then into the org.activiti.designer.parent directory, which is of course the directory of the project with the same name. Now perform the following Maven commands:
This might take a while because Maven will now download a lot of dependencies to your local repository and setup the projects. Make sure the command ends with a Build Successful so you know everything's OK as far as Maven is concerned.
- Go back to Eclipse, select all of the projects and right click and choose refresh. The information set by Maven will now be picked up by Eclipse. If you like being thorough, you can perform a Project > Clean command as well.
- Your projects will still have lots of errors at this point. This is because most of the projects depend on the org.activiti.designer.model project, which contains, as you may have guessed, the data model that is used for diagrams. At the moment, the model is still missing and you need to generate it. Open the org.activiti.designer.model project and go to the model directory. Double click the BPMN20.genmodel file and select the root node in the tree that appears in the opened editor.
- In Eclipse's menu, go to Generator > Reload... Select the Ecore model item and click next. In the next page, leave the defaults and click next to move to the next page. Make sure all 4 elements that appear there are selected and choose Finish. If you are wondering what exactly you've just done: The BPMN20.ecore and other .ecore files in the model directory contain the model for EMF. The .genmodel file uses these files to create an overall model that can be used to generate code. That's why you reload the files into it first.
- With the same item still selected in the BPMN20.genmodel file, go to the Eclipse menu again and choose Generator > Generate all. Depending on your machine, this can take quite a while. EMF will generate code (Java classes) for the model and place them in the org.activiti.designer.model project, in src/main/java.
- After generation is complete, right-click the org.activiti.designer.model project and choose refresh. Your workspace should now trigger a build because it detects changes in the model project.
- Now you have a working environment for working with Activiti Designer. To run Designer, right click the org.activiti.designer.eclipse project and choose Run as > Eclipse application.
This section briefly describes the different projects used in Activiti Designer.
- org.activiti.designer.eclipse: contains the main extensions of Eclipse extension points and a lot of shared code for working with the model, saving resources and utilities.
- org.activiti.designer.gui: contains most of the UI code, mainly functionality that utilizes Graphiti for drawing diagrams.
- org.activiti.designer.mode: the EMF model project that holds the model for BPMN diagrams and BPMN Diagram Interchange.
- org.activiti.designer.help: help files for end users.
- org.activiti.designer.export.bpmn20: provides an extension of the ExportMarshaller extension point to generate BPMN 2.0 xml files.
- org.activiti.designer.export.image: provides an extension of the ExportMarshaller extension point to generate and image of a process diagram.
- org.activiti.designer.validation.bpmn20: provides an extension of the ProcessValidator extension point to validate diagrams according to BPMN 2.0 rules.
- org.activiti.designer.integration: provides APIs to developers creating CustomServiceTask extensions.
- org.activiti.designer.parent: maven parent project, used mainly for building the project.
- org.activiti.designer.feature: contains an Eclipse feature definition, which groups the various projects into the installable Activiti Designer feature.
- org.activiti.designer.updatesite: contains an Eclipse update site definition, which allows you to build a website that can be used as an Eclipse update site.