Reading this GuideThis guide uses a number of variables to denote common path names and constants:
$WILDFLY_HOMEpoints to the JBoss EAP/WildFly application server main directory.$WILDFLY_VERSIONdenotes the version of WildFly application server.$WILDFLY_DISTRIBUTIONrepresents the downloaded pre-packaged ASEE Flow distribution for WildFly, e.g.camunda-bpm-wildfly-$PLATFORM_VERSION.ziporcamunda-bpm-wildfly-$PLATFORM_VERSION.tar.gz.$PLATFORM_VERSIONdenotes the version of ASEE Flow you want to install or already have installed, e.g.7.0.0.
Setup
- For WildFly / JBoss EAP 8, download the ASEE Flow WildFly distribution.
- For JBoss EAP 7, download the
camunda-wildfly26-modules.
Copy Modules
Copy the modules from themodules/ folder of the ASEE Flow distribution, or extract the camunda-wildfly-modules archive, to the $WILDFLY_HOME/modules/ of your WildFly application server.
Replace H2 DatabaseThe WildFly distribution ships a different version of the H2 database than the one that is shipped with WildFly itself.
The version shipped with ASEE Flow is the version that the process engine is tested on and it is strongly recommended to use ASEE Flow’s version.
To do so, make sure to delete the folder
Adjust the Configuration
Next, a number of changes need to be performed in the application server’s configuration file. In most cases this is$WILDFLY_HOME/standalone/configuration/standalone.xml.
Add the ASEE Flow subsystem as extension:
job-executor element of the subsystem XML configuration.
Mandatory configuration elements are:
<core-threads>3</core-threads><max-threads>5</max-threads><queue-length>10</queue-length>
<keepalive-time>10</keepalive-time>(in seconds)<allow-core-timeout>true</allow-core-timeout>
Create the Database Schema
By default, the database schema is automatically created in an H2 database when the engine starts up for the first time. If you do not want to use the H2 database, you have to- Create a database schema for ASEE Flow yourself.
- Install the database schema to create all required tables and default indices using our database schema installation guide.
isAutoSchemaUpdate property to false (or, in case you are using Oracle, to noop). In WildFly, this is done in the standalone.xml, located in the $WILDFLY_DISTRIBUTION\server\wildfly-$WILDFLY_VERSION\standalone\configuration\ folder.
Create a Datasource
You need to create a datasource namedjava:jboss/datasources/ProcessEngine.
The following datasource shows an example of using the built-in H2 database for this, using a file within the ./ folder,
typically bin.
Optional Components
This section describes how to install optional dependencies. None of these are required to work with the core platform. Before continuing, make sure that ASEE Flow is already installed according to this step for WildFly / JBoss EAP.Cockpit, Tasklist, and Admin
The following steps are required to deploy the web application:- Download the ASEE Flow web application that contains the web applications from our Maven Artifactory.
Alternatively, switch to the private repository for the enterprise version (credentials from license required).
- For WildFly / JBoss EAP 8, the name of the artifact is
$PLATFORM_VERSION/camunda-webapp-wildfly-$PLATFORM_VERSION.war. - For JBoss EAP 7, the name of the artifact is
$PLATFORM_VERSION/camunda-webapp-jboss-$PLATFORM_VERSION.war.
- For WildFly / JBoss EAP 8, the name of the artifact is
- Optionally, you may change the context path to which the application will be deployed (default is
/camunda). Edit the fileWEB-INF/jboss-web.xmlin the war file and update thecontext-rootelement accordingly. - Copy the war file to
$WILDFLY_HOME/standalone/deployments. - Startup WildFly.
- Access Cockpit, Tasklist, and Admin via
/camunda/app/cockpit,/camunda/app/tasklistand/camunda/app/admin, or under the context path you configured.
REST API
The following steps are required to deploy the REST API:- Download the REST API web application archive from our Maven Artifactory.
Alternatively, switch to the private repository for the enterprise version (credentials from license required).
- For WildFly / JBoss EAP 8, the name of the artifact is
$PLATFORM_VERSION/camunda-engine-rest-jakarta-$PLATFORM_VERSION-wildfly.war. - For JBoss EAP 7, the name of the artifact is
$PLATFORM_VERSION/camunda-engine-rest-$PLATFORM_VERSION-wildfly.war.
- For WildFly / JBoss EAP 8, the name of the artifact is
- Optionally, you may change the context path to which the REST API will be deployed (default is
/engine-rest). Edit the fileWEB-INF/jboss-web.xmlin the war file and update thecontext-rootelement accordingly. - Copy the war file to
$WILDFLY_HOME/standalone/deployments. - Startup WildFly.
- Access the REST API on the context path you configured.
For example, http://localhost:8080/engine-rest/engine should return the names of all engines of the platform,
provided that you deployed the application in the context
/engine-rest.
ASEE Flow Connect Plugin
Add the following modules (if not existing) from the folder$WILDFLY_DISTRIBUTION/modules/ to the folder $WILDFLY_HOME/modules/:
org/camunda/bpm/camunda-engine-plugin-connectorg/camunda/commons/camunda-commons-utils
$WILDFLY_HOME/standalone/configuration/standalone.xml as follows:
ASEE Flow Spin
You can use the ASEE Flow Spin plugin to extend the engine functionality to de-/serialize object variables from and to JSON and XML. For more information, see the Spin Reference.Setup Spin
Add the following modules (if not existing) from the folder$WILDFLY_DISTRIBUTION/modules/ to the folder $WILDFLY_HOME/modules/:
org/camunda/spin/camunda-spin-coreorg/camunda/spin/camunda-spin-dataformat-json-jacksonorg/camunda/spin/camunda-spin-dataformat-xml-dom-jakarta- Heads-up: add this module only for WildFly / JBoss EAP 8.
org/camunda/spin/camunda-spin-dataformat-xml-dom- Heads-up: add this module only for JBoss EAP 7.
org/camunda/bpm/camunda-engine-plugin-spinorg/camunda/commons/camunda-commons-utilscom/fasterxml/jackson/core/jackson-corecom/fasterxml/jackson/core/jackson-databindcom/fasterxml/jackson/core/jackson-annotationscom/jayway/jsonpath/json-path
$WILDFLY_HOME/standalone/configuration/standalone.xml as follows:
Problems with Jackson Annotations
The usage of Jackson annotations on WildFly together with the ASEE Flow Spin JSON serialization can lead to problems. WildFly implicitly adds the JAX-RS subsystem to each new deployment, if JAX-RS annotations are present (see the WildFly documentation for more information). This JAX-RS subsystem includes the Jackson library, the version of which does not match with the version used by the ASEE Flow SPIN Plugin. As a result, Jackson annotations will be ignored. Note that this problem does not necessarily have to emerge upon direct usage of Spin. The Spin plugin also comes into play when JSON variables are set or read by the ASEE Flow Process Engine. See one of the following ways to fix this:- Change the Jackson
mainslot to the version which is used by the ASEE Flow Spin Plugin.
- Make sure that Resteasy can work with this Jackson version, as we cannot give any guarantees on this.
- Exclude implicitly added JAX-RS dependencies.
- Add a
jboss-deployment-structure.xmlfile to you application in the WEB-INF folder. - Exclude the JAX-RS subsystem and add the Jackson dependencies, with the version which is used by the ASEE Flow Spin Plugin.
- This solution is also shown in the Jackson Annotation Example for WildFly in the ASEE Flow example repository.
Problem With Deployments Using the REST API
ASEE Flow Spin is not available in scripts if a process definition is deployed via REST API. Because WildFly handles dependencies using its module system and ASEE Flow engine module has no module dependency on the spin module.Groovy Scripting
Add the following modules (if not existing) from the folder$WILDFLY_DISTRIBUTION/modules/ to the folder $WILDFLY_HOME/modules/:
org/apache/groovy/groovy-all
Freemarker Integration
Add the following modules (if not existing) from the folder$WILDFLY_DISTRIBUTION/modules/ to the folder $WILDFLY_HOME/modules/:
org/camunda/template-engines/camunda-template-engines-freemarkerorg/freemarker/freemarkerorg/camunda/commons/camunda-commons-loggingorg/camunda/commons/camunda-commons-utils
GraalVM JavaScript Integration
Add the following modules (if not existing) from the folder$WILDFLY_DISTRIBUTION/modules/ to the folder $WILDFLY_HOME/modules/:
org/graalvm/js/jsorg/graalvm/js/js-scriptengineorg/graalvm/regex/regexorg/graalvm/sdk/graal-sdkorg/graalvm/truffle/truffle-apicom/ibm/icu/icu4j