Create Processes Webapp

Processes are deployed on the activiti Server as Web Application. The Web Application will contain

1 Building Processes Webapp with Maven

The Processes Webapp is built using an overlay. The following is the minimal pom.xml

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.gentics</groupId>
	<artifactId>processes</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>war</packaging>
	<name>Demo Processes</name>
	<properties>
		<gcms.version>5.31.35</gcms.version>
		<mariadb.version>2.2.0</mariadb.version>
	</properties>
	<dependencies>
		<dependency>
			<groupId>com.gentics</groupId>
			<artifactId>contentnode-activiti-integration</artifactId>
			<version>${gcms.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.gentics</groupId>
			<artifactId>contentnode-activiti-webapp</artifactId>
			<version>${gcms.version}</version>
			<type>war</type>
			<scope>runtime</scope>
		</dependency>
		<dependency>
			<groupId>org.mariadb.jdbc</groupId>
			<artifactId>mariadb-java-client</artifactId>
			<version>${mariadb.version}</version>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.5.1</version>
				<configuration>
					<verbose>true</verbose>
					<fork>true</fork>
					<executable>${JAVA_1_8_HOME}/bin/javac</executable>
					<compilerVersion>1.8</compilerVersion>
					<source>1.8</source>
					<target>1.8</target>
					<maxmem>1024m</maxmem>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.3</version>
				<configuration>
					<overlays>
						<overlay>
							<groupId>com.gentics</groupId>
							<artifactId>contentnode-activiti-webapp</artifactId>
						</overlay>
					</overlays>
					<failOnMissingWebXml>false</failOnMissingWebXml>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.3</version>
				<executions>
					<execution>
						<id>create-par</id>
						<phase>package</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<tasks>
								<echo
									message="Creating bar: ${project.build.directory}/${project.artifactId}-${project.version}.bar" />
								<zip
									destfile="${project.build.directory}/${project.artifactId}-${project.version}.bar">
									<fileset dir="src/main/resources/diagrams">
										<include name="**/*.bpmn" />
										<include name="**/*.bpmn20.xml" />
										<include name="**/*.form" />
									</fileset>
								</zip>
							</tasks>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>

Process definitions (e.g. as .bpmn files) are located at src/main/resources/diagrams.

The Webapp is built with the command


mvn clean package

and the resulting file target/processes-0.0.1-SNAPSHOT.war must be deployed on the activiti Server.