Although we already have the Activiti Cloud, Activiti 6.0 is still not that old. We can still use Activiti 6.0 in localhost for learning purposes. However, we should consider migrating to Activiti Cloud for real projects. This post will help those new to BPM and Activiti set up Activiti 6.0 locally for testing and learning purposes. Most of what we learn from playing around with Activiti 6.0 is still valid when we transition to Activiti Cloud.
Requirements For Activiti To Run in Localhost
We used the following for this post.
- Windows 10 64 bit
- Apache Tomcat 8.5.50
- Download the zip version to avoid installing Tomcat in localhost
- OpenJDK 8 from adaptopenjdk.net
- Choose the zip version, so we do not need to install the JDK in localhost
- Activiti 6.0.0
- Look for its download link in the “Older Versions” section of the Get Started page.
Prepare The Local Environment For Activiti 6.0
Since we are using non-installer versions of Apache Tomcat and OpenJDK8, we need to use paths and environment variables. First, unzip the zip files. Next, open a command-line window and change the current directory to <TOMCAT_HOME>/bin directory. Then, use the following commands.
1 2 3 | set JAVA_HOME=C:\Users\youruser\somewhere\<OPENJDK8_HOME> set TOMCAT_HOME=C:\Users\youruser\somewhere\<TOMCAT_HOME> set PATH=%PATH%;%JAVA_HOME%\bin |
Before running the commands, replace the paths accordingly. Consider the following example.
1 2 3 | set JAVA_HOME=C:\Users\karldev\Desktop\dev\apps\OpenJDK8U-jdk_x64_8u312b07\jdk8u312-b07 set TOMCAT_HOME=C:\Users\karldev\Desktop\dev\apps\apache-tomcat-8.5.50-activiti set PATH=%PATH%;%JAVA_HOME%\bin |
Next, start up Tomcat using the startup.bat command and access http://localhost:8080 using a web browser.
Download Activiti and copy war Files
Next, download Activiti 6.0 and extract its content to some directory. The content has the following directory structure.
1 2 3 4 5 6 7 | C:. ├───database │ ├───create │ ├───drop │ └───upgrade ├───libs └───wars |
Under the wars directory, we have the following war files.
1 2 3 | activiti-admin.war activiti-app.war activiti-rest.war |
Copy these files Activiti 6.0 war files to <TOMCAT_HOME>/webapps and start Tomcat up in localhost if it is not yet running.
Sign In To Activiti Applications
In the previous section, we copied three wars files. These war files are web applications within Tomcat.
From here on, we can play around with Activiti 6.0 in localhost.
Java 11 and Tomcat 9+ with Activiti 6.0
Activiti 6.0 will not work with Java 11 (and later versions) and Tomcat 9 (and later versions).