Platform has been tested with Activiti 5 version, which is composed of 2 distinct web applications:
Activiti Explorer, used to graphically define business processes (workflows); this web application is embedded into the Platform App Designer
Activiti Rest, which is the engine, able to execute any number of processed; this web app does not provide any UI, but it provides a Rest API used by Platform to manage processes.
In the following section is described the manual steps needed to correctly setup such integration.
create an empty database schema which will be used by Activiti to store its content. It is recommended to re-use the same schema used by Platform as repository
download Activiti Explorer and Activiti Rest, release 5 from the following link:
decompress the downloaded zip file and find the 2 .war files, related to Activiti Explorer and Activiti Rest
rename the .war into .zip file and decompress the 2 .war files and remove the previous .war file, not any more needed; be sure that the unzip process has created the corresponding subfolders: activiti-explorer and activiti-rest
once decompressed the 2 files, a few configuration files must be modified, in order to correctly set up the database connection and LDAP connection; this task is described in detail in the following section
prepare an ad hoc Tomcat 9, distinct from the one used by Platform and change the bin/catalina.sh file in order to set the JAVA_HOME variable to your JDK 11 path
copy the 2 subfolders activiti-explorer and activiti-rest into the webapps Tomcat's subfolder
copy the JDBC driver used by Platform into the lib Tomcat's subfolder
copy the PlatformActiviti.jar file to WEB-INF/lib subfolder of both web applications
copy the following the files to the lib Tomcat's subfolder: jaxb-api-2.4.0-b180830.0359.jar
jaxb-impl-2.4.0-b180830.0438.jar
jaxb-impl.jar
Now the setup is completed and Activiti ready to be used.
Note: due to default security properties on Tomcat, escaped forward slashes (%2F and %5C) are not allowed by default (400-result is returned). This may have an impact on the deployment resources and their data-URL, as the URL can potentially contain escaped forward slashes.
When issues are experienced with unexpected 400-results, set the following system-property:
comment/remove the section related to the demo included by default in Activiti
include the "utils" bean, used by a few Service Tasks provided by Platform (web service, SQL execution)
define the SMTP settings, in order to allow sending email from automatic tasks
define the LDAP settings, in order to inherit accounts from Platform embedded LDAP server or from an external LDAP server
The Platform embedded LDAP server can be used in case you do not have an LDAP server available in your organization but still want to manage the same users and groups (roles) managed in Platform. In such a scenario, Platform can be configured to provide an LDAP, so that Activiti can connect to and ask for authentication and user roles.
Note: you have to choose this choice also when you have an external LDAP server but this does not provide groups as well.
In case your organization already provides an external LDAP server (and consequently Platform has been already configured to redirect the authentication task to it), the same LDAP server must be configured here too.
In such a scenario, you have to fill in the same settings reported above, with values depending on the specific LDAP settings and related users/groups configurations.
WEB-INF/classes/stencilset.json
This file contains the palette content in the Worflow editor. It can be (partially) customized.
The default stencilset.json content includes the definition of the servicetask, with can be enhanced with what reported below, so that the Service Task (the most used automatic task involving Plaform) provides additional settings, helpful when using this kind of task. Using the content reported below, the Service Task provides 3 pre-defined uses of Service Tasks: SQL Statement (execution of SQL writing instructions), SQL Query (execution of SQL queries), Platform Web service (public or not).
In order to apply these changes, open with a text editor the stencilset.json file, find the "servicetaskbase" definition and replace the whole content was follows:
Note: include the utils bean and the SMTP settings for sending emails.
Note: in the example above, the authentication process has been redirected to the embedded LDAP server in Platform.
Configuration in Platform App Designer
In order to let Platform communicate with Activiti, at least 2 parameters must be defined:
Finally, in case you want to activate the Platform embedded LDAP server, you have also to fill in the parameter named "LDAP - Embedded LDAP port", with the same value specified in WEB-INF/activiti-standalone-context.xml
ACTIVITI - URL to Activiti Rest - the value for this parameter must be set with a local URL, since this web app must not be public, but only accessible from within Platform server, so the URL should be something like:
ACTIVITI - URL to Activiti Explorer - the value for this parameter must be set with a public URL, since the web editor must be opened remotelly, starting form the Platform App Designer, so the URL should be something like: