- Published: 18 January 2011
Activiti is an open-source BPMN platform distributed under the Apache license. It's written in Java and thus can run in any Java application, on a server, on a cluster or in the cloud. Activiti integrates perfectly with Spring, it is extremely lightweight and based on simple concepts. Here's a first tutorial which shows you a first taste of this very interesting workflow and Business Process Management (BPM) Platform.
The installation of Activiti is not particularly tricky, you are adviced to follow the excellent User guide so we will build a simple example which runs on Tomcat and JBoss AS. In short, you should should prepare your environment (from the setup folder)
(This will create required tables, download tomcat and install libraries and examples)
Then download Eclipse plugin (if you plan to design your processes from Eclipse)
Create a New Web Project
Ok. Now let's create a Web application which uses Activiti Api to start process instances and generates a Task list.
Create a new Dynamic Web application from Eclipse menu: File | New | Other | Web | Dynamic Web project and choose a name for it.
Configure Activiti libraries in the project
Now add the following libraries to your project (You can find them in the files/dependancies/libs of your Activiti installation)
Please note that activity.cfg.jar contains the Activity engine setup (activity.cfg.xml).
Here's an example activity.cfg.xml which I have created for Oracle:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration"> <!-- Database configurations --> <property name="databaseType" value="oracle" /> <property name="jdbcUrl" value="jdbc:oracle:thin:@192.168.1.1:1521:ACTIVITI" /> <property name="jdbcDriver" value="oracle.jdbc.driver.OracleDriver" /> <property name="jdbcUsername" value="USER" /> <property name="jdbcPassword" value="PASS" /> </bean> </beans>
- Next >>