Instructions for the Workflowmanager (WIP)

 

General Information

Which requirements should I meet in order to start?


It's mandatory  to have access to the internet, knowledge of MySQL, Java, GitHub and optional of mosquitto as MQTT Server Broker.                                                                                                                                 

What steps do I have to take to start the workflow manager?


It's necessary to install MySQL, Java Database Connector (JDBC) and Activiti 5. It's also needful to download project directory Workflowmanager from GitHub. Next step is the configuration of MySQL. Then a user and password has to be set up for activiti 5. Next up edit db.properies of Activiti to use MySQL as Activiti Storage. And it's optional to install and start mosquitto.

 

Detailed Information

Installation process / Cheat sheet (example for Debian based distros):


Update apt repositories and upgrade:
sudo apt update
sudo apt upgrade

Install MySQL:
apt-get install mysql-server

Install JDK:
apt-get install default-jdk

Install Java Database Connector (JDBC):
wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.44.zip -O /tmp/mysql-connector-java.zip
unzip /tmp/mysql-connector-java.zip -d /tmp && \
cp /tmp/mysql-connector-java-5.1.44/mysql-connector-java-5.1.44-bin.jar /opt/tomcat/webapps/activiti-rest/WEB-INF/lib/
cp /tmp/mysql-connector-java-5.1.44/mysql-connector-java-5.1.44-bin.jar /opt/tomcat/webapps/activiti-explorer/WEB-INF/lib/
rm -rf /tmp/mysql-connector-java.zip /tmp/mysql-connector-java-5.1.44

Install Activiti 5:
sudo groupadd tomcat
sudo useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat
cd /tmp
curl -O http://mirrors.ae-online.de/apache/tomcat/tomcat-8/v8.5.23/bin/apache-tomcat-8.5.23.tar.gz
sudo mkdir /opt/tomcat
sudo tar xzvf apache-tomcat-8.5.23.tar.gz -C /opt/tomcat --strip-components=1
cd /opt/tomcat
sudo chgrp -R tomcat /opt/tomcat
sudo chmod -R g+r conf
sudo chmod g+x conf
sudo chown -R tomcat webapps/ work/ temp/ logs/
update-java-alternatives -l
nano /etc/systemd/system/tomcat.service

Paste following to tomcat.service:

[Unit]

Description=Apache Tomcat Web Application Container
After=network.target

[Service]

Type=forking
Environment=JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'
ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/opt/tomcat/bin/shutdown.sh
User=tomcat
Group=tomcat
UMask=0007
RestartSec=10
Restart=always

[Install]

WantedBy=multi-user.target
cd /tmp
wget https://github.com/Activiti/Activiti/releases/download/activiti-5.22.0/activiti-5.22.0.zip -O /tmp/activiti.zip
unzip /tmp/activiti.zip -d /opt/activiti
unzip /opt/activiti/activiti-5.22.0/wars/activiti-explorer.war -d /opt/tomcat/webapps/activiti-explorer
unzip /opt/activiti/activiti-5.22.0/wars/activiti-rest.war -d /opt/tomcat/webapps/activiti-rest
rm -f /tmp/activiti.zip

Download project directory Workflowmanager from GitHub:
Download with browser as .zip or use git clone

Configure MySQL:
mysql create database activititest;
CREATE USER 'activiti'@'localhost' IDENTIFIED BY 'activiti';
GRANT ALL PRIVILEGES ON activititest . * TO 'activiti'@'localhost';

Edit db.properies of Activiti to use MySQL as Activiti Storage, for example by inserting:
db=activititest
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/activititest
jdbc.username=activiti
jdbc.password=activiti

Create Users “juice”,”puree” and “pieces” in activiti: