User Guide
  • Introduction
  • Overview
    • About 4WS.Platform
      • Architecture
      • Enterprise Edition
      • Tech specs and requirements
      • Warp SDK
    • Creating a web application
  • Core features
    • Tables
    • SqlTool
    • Definition of Data models and Relations
      • Relations
      • Reverse Engineering
      • Custom Fields
    • Defining business components
      • What are business components
      • Business components to fill-in panels
      • Creating business components
        • By a datastore entity
        • By a MongoDB collection
      • Defining Custom Java Business component
    • Defining the UI
      • App Designer
        • App Designer Menu
        • Definition of additional data sources
        • Panel containers and layouts
          • Tab panel
          • Alternative panel
          • Accordion panel
          • Vertical orientation panel
          • Horizontal orientation panel
          • Columns panel
          • Table panel
          • Generic panel
          • Responsive panel
        • Window content
          • Grid Panel
          • Form Panel
          • Filter Panel
          • Tree Panel
          • Google Map Panel
          • Preview Panel (old Image panel)
          • Tree + Grid Panel
          • Image Gallery
        • Windows list
        • Panel definition
          • Columns properties
          • Controls properties
          • Filter properties
          • Supported components
        • Variables
        • Code selectors
          • When not to use a dynamic combo-box
        • Smart Filter and Advanced Filter
        • Multi Value Combobox Filter
        • Multi Value Tree Filter
        • Buttons
        • Translations
          • Translations about GUI components and internationalization settings
          • Data coming from database
          • Custom code and translations
        • Application Menu
        • Bulk import binded to a grid
        • Range Date Filter
      • Web Interpreter
        • Grid components
        • Detail forms
        • Other components
        • Other features
          • Chat
        • Global variables
          • Client-side global variables
          • Server global variables
        • Forgot Password
    • Working with users and roles
      • Rule for roles
      • Permissions Administrator
    • Wizard
      • How to add a checkbox grid to select one or more rows
      • How to load a second grid when clicking on a row from the first grid
      • How to load a form when clicking on a row of the grid
      • How to open a window when double clicking on a row of the grid
      • How to open a window with right click on the popup menu
      • How to open a window when pressing a button on the grid toolbar
      • How to load a grid after loading a form
      • How to open a window when pressing a button on the form toolbar
      • How to load a grid when clicking on a tree node
      • How to load a form when clicking on a tree node
    • Defining events
      • Panel events
      • Column events
      • Control events
      • Filter events
      • Timer events
      • Start-End event
    • Server-side Javascript & Web Service
      • Server-side Javascript
      • Grid component filled by a server-side JS
      • Detail component filled by a server-side JS
      • How to define a server-side JavaScript action
      • Web service
  • Setting up the environment
    • How to install
    • Application parameters
    • Global parameters
  • Modules
    • Reports & Charts
      • Jasper Report + iReport
      • Online report
      • Docx templating
      • Charts
      • Pivot Grid
      • Multidimensional pivot grid
      • Data Export from SQL query
    • SSO
      • Identity management in Platform
        • Identity management on the internal Platform database
        • Identity management based on Google SSO
      • LDAP
        • LDAP support
        • Identity management based on LDAP and database
        • Identity management based on an embedded LDAP server used by Alfresco and or Activiti
        • Identity management based on a remote LDAP server to connect to Platform on the cloud
        • Connecting an LDAP server to Activiti BPM
        • Connecting an LDAP server to Alfresco ECM
      • Google SSO
        • Google SSO
        • Google OAuth2
        • Identity management based on Google SSO
      • Custom SSO
      • Firebase
    • Mobile
      • Mobile introduction
      • Offline vs Online
        • Server side features
        • Server side functionalities
        • Server side Platform features
        • Mobile app features
      • Mobile side specifics
        • Customizations
          • Custom theme editor
        • App Menu
        • Window content
          • Detail scrollable form
          • Scrollable paginated grid
          • Constraint layout
          • Constraint panel
          • Collection grid view
          • Preview panel (mobile)
        • Form Controls
      • Reference guide
      • Cleaning up data
      • How to
      • App deployment
        • App deployment for the iOS platform
        • App deployment for the Android platform
      • Style properties
      • Appendix : Synchronization flow
      • Translations
    • GSuite
      • Introduction
      • Client-side integration
      • GMail
      • Calendar
      • Drive
      • Contacts
    • Google Cloud Platform
      • Datastore
        • Google Datastore Introduction
        • How to create Datastore entities
      • Google Cloud Storage
    • Scheduler
      • Scheduler Introduction
      • Process settings
        • How to define a sequence of consecutive processes
        • How to define a Custom Java Business component
        • How to define a Grid Data Import
        • How to define a server-side Javascript action
      • Email notifications
      • Process executions
      • Manually start a scheduled process
      • Process input parameters
    • Queue Manager
    • Log & Analysis
      • Application Log
      • Log statistics
      • App analyzer
      • Table log
      • Threads
      • Sessions and heap memory
      • Heap memory analysis
      • Access Log
      • Datastore statistics
      • Total monthly costs with Google Datastore
      • Service Monitoring
        • Introduction
        • Defining a service to monitor
        • Notifications setup
        • Events automatically managed by Platform
        • Remote Platform servers
        • Knowledge base
        • Adding log programatically
        • Searching for logged data
        • Use cases
    • File Management
    • Export and Import of Metadata
      • Application Metadata Management
    • Trigger writing operations
    • Audit
    • BPM
      • BPMN Introduction
      • BPMN main parts
      • Activiti Setup
      • Platform integration
        • Processes
        • Models
        • Process instances
        • To-do list
        • Process history
      • Process Web Modeler
        • Model Creation
          • Start-End Event
          • Gateways
        • Supported objects
        • Start tasks and user tasks
        • Form properties
          • Important notes
          • Property types
        • Service tasks
          • Web service
          • SQL Query
          • SQL statement
        • Mail task
        • Script task
          • Example : how to get a value previously read from a SQL query
          • Example : how to get the current process instance id
        • Timer events
        • Subprocess and Call Activiti
      • Utility methods available in Platform
        • How to start a process from a JavaScript action
        • How to complete a user task from a JavaScript action
      • An example
        • Processes
        • Instances
        • Activities
        • History
    • Embedded CMS
    • ECM
      • Alfresco
        • Alfresco Introduction
        • Integration between 4WS.Platform and Alfresco
          • Integration at GUI level
          • Integration at model level
          • Integration at authentication and authorizations level
          • Additional features
        • How to use 4WS.Platform and Alfresco together
          • Set the same Identity Management system
          • Define document types and aspects in Alfresco
          • Import the document types and aspects definitions in 4WS.Platform
          • Define document types and aspects in 4WS.Platform
          • Reverse engineering of document types or aspects
          • Definition of business components to fill-in panels
          • Definition of the GUI
          • Additional server-side services
        • Requirements
        • Current limits in 4WS.Platform - Alfresco integration
      • Archiflow
        • Setup
        • Archiflow artifacts
        • How to
    • Lotus Notes Migration Tool
    • NoSQL databases
      • MongoDB
        • MongoDB Introduction
        • Setting up the environment
        • How to create collections
        • How to create business components
        • How to create windows filled with data coming from MongoDB collections
        • Design rules
      • Google Datastore
        • Google Datastore Introduction
        • Setting up the environment
        • How to create entities
        • How to create business components
        • How to create windows filled with data coming from Datastore entities
        • Design rules
    • TensorFlow
    • Web Page Development
      • Pure Web Page Development
      • Google Material Design development
      • Appendix A - a complete example without any lib
      • Appendix B - a complete example with Google MD
    • Jira Integration
    • Platform for GAE
    • SQL errors management
    • Multidimensional pivot grid
    • Quality
      • Automated Web Service Testing
      • Automated unit testing
      • Source code static analysis using ESlint
      • Source code static analysis using SonarQube
  • Troubleshootings
  • Best practises
    • Database design
    • Database maintenance
    • Creating a Web app : common use cases
    • Creating a mobile app : common use cases
Powered by GitBook
On this page
  • Configuring Activiti and Platform
  • Configuration files for Activiti Explorer
  • WEB-INF/classes/db.properties
  • WEB-INF/activiti-ui-context.xml
  • WEB-INF/activiti-standalone-context.xml
  • WEB-INF/classes/stencilset.json
  • explorer/src/css/custom-styles.css
  • Configuration files for Activiti Rest
  • Configuration in Platform App Designer

Was this helpful?

  1. Modules
  2. BPM

Activiti Setup

PreviousBPMN main partsNextPlatform integration

Last updated 5 years ago

Was this helpful?

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:

-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true.

Configuring Activiti and Platform

Both Activiti web applications and Platform must be setup in order to work together. In the following sub-sections all steps neeeded are reported.

Configuration files for Activiti Explorer

Activiti Explorer uses a series of configuration files, described below.

WEB-INF/classes/db.properties

baseUrl=http://localhost:platformport/platformwebcontext
sql=select USER_CODE_ID FROM PRM01_USERS WHERE STATUS='E'
db=mysql
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://dbhostname:3306/databasename
jdbc.username=dbusername
jdbc.password=dbpassword

This file is used to connect Activiti Explorer to its database schema. Values to change are:

  • platformport and platformwebcontext, related to the settings of the other Tomcat, the one used by Platform web app

  • dbhostname and databasename (the same used by Platform, since the database schema should be the same)

  • dbusername and password (the same used by Platform, since the database schema should be the same)

WEB-INF/activiti-ui-context.xml

Here it is important to define correctly the adminGroups and userGroups.

The adminGroups should always include the value 1, since Platform default admin role id is 1.

The userGroups should be all the others.

Anyway, PlatformActiviti.jar integration library should by-pass these default settings and automate the reading of Platform roles.

WEB-INF/activiti-standalone-context.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jee="http://www.springframework.org/schema/jee"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
       http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.1.xsd">

  <!-- This Spring config file is NOT used in Alfresco, as the Activiti engine is wired in a different way there -->
  <!--       
  <bean id="demoDataGenerator" class="org.activiti.explorer.demo.DemoDataGenerator" init-method="init">
    <property name="processEngine" ref="processEngine" />

    <property name="createDemoUsersAndGroups" value="false" />
    <property name="createDemoProcessDefinitions" value="false" />
    <property name="createDemoModels" value="false" />
    <property name="generateReportData" value="false" />
  </bean>
  -->

      <bean id="utils"
        class="it.sinesy.activiti.util.Utils">
    </bean>

  <bean id="dbProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="location" value="classpath:db.properties" />
    <!-- Allow other PropertyPlaceholderConfigurer to run as well -->
    <property name="ignoreUnresolvablePlaceholders" value="true" />
  </bean>

  <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
    <property name="driverClassName" value="${jdbc.driver}" />
    <property name="url" value="${jdbc.url}" />
    <property name="username" value="${jdbc.username}" />
    <property name="password" value="${jdbc.password}" />
    <property name="defaultAutoCommit" value="false" />
  </bean>

  <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
      <property name="dataSource" ref="dataSource" />
  </bean>


  <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
      <property name="dataSource" ref="dataSource" />
      <property name="transactionManager" ref="transactionManager" />
      <property name="databaseSchemaUpdate" value="true" />
      <property name="jobExecutorActivate" value="true" />
     <property name="mailServerHost" value="..." />
    <property name="mailServerPort" value="..." />
   <property name="customFormTypes">
      <list>
        <bean class="org.activiti.explorer.form.UserFormType"/>
        <bean class="org.activiti.explorer.form.ProcessDefinitionFormType"/> 
        <bean class="org.activiti.explorer.form.MonthFormType"/>   
      </list>
    </property>


    <property name="configurators">
      <list>
          <bean class="org.activiti.ldap.LDAPConfigurator">

            <!-- Server connection params -->
            <property name="server" value="..." />
            <property name="port" value="..." />
                <property name="user" value="cn=...,dc=..." />
            <property name="password" value="..." />

            <!-- Query params -->
            <property name="baseDn" value="dc=com" />
            <property name="queryUserByUserId" value="(&amp;(objectClass=person)(cn={0}))" />
            <!--
            <property name="queryUserByUserId" value="(&(objectClass=inetOrgPerson)(uid={0}))" />
            <property name="queryUserByFullNameLike" value="(&(objectClass=inetOrgPerson)(|({0}=*{1}*)({2}=*{3}*)))" />
            -->
            <!--
            <property name="queryGroupsForUser" value="(&(objectClass=groupOfUniqueNames)(uniqueMember={0}))" />
            -->
            <!-- Attribute config -->
            <property name="userIdAttribute" value="..." />
            <property name="userFirstNameAttribute" value="..." />
            <property name="userLastNameAttribute" value="..." />
            <!--
            <property name="groupIdAttribute" value="userPrincipalName" />
            <property name="groupNameAttribute" value="userPrincipalName" />
            -->
            <property name="groupIdAttribute" value="cn" />
            <property name="groupNameAttribute" value="cn" />

            <!--<property name="ldapQueryBuilder" ref="platform4WSLdap" />-->

            <property name="ldapGroupManagerFactory" ref="..."/>
            <property name="ldapUserManagerFactory" ref="..."/>


          </bean>
      </list>
    </property>




  </bean>


  <bean id="ldapConfigBean" class="org.activiti.ldap.LDAPConfigurator" />
  <bean id="platform4WSGroupManagerFactory" class="it.sinesy.activiti.authorizations.Platform4WSGroupManagerFactory" >
      <constructor-arg type="org.activiti.ldap.LDAPConfigurator" ref="ldapConfigBean" />
      <constructor-arg type="org.apache.commons.dbcp.BasicDataSource" ref="dataSource" />
  </bean>
  <bean id="platform4WSUserManagerFactory" class="it.sinesy.activiti.authorizations.Platform4WSUserManagerFactory" >
      <constructor-arg type="org.activiti.ldap.LDAPConfigurator" ref="ldapConfigBean" />
      <constructor-arg type="org.apache.commons.dbcp.BasicDataSource" ref="dataSource" />
  </bean>

  <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean" destroy-method="destroy">
      <property name="processEngineConfiguration" ref="processEngineConfiguration" />
  </bean>

  <bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
  <bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
  <bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
  <bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
  <bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
  <bean id="identityService" factory-bean="processEngine" factory-method="getIdentityService" />

  <bean id="activitiLoginHandler" class="org.activiti.explorer.ui.login.DefaultLoginHandler">
    <property name="identityService" ref="identityService" />
  </bean>

</beans>

Here it is important to

  • 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.

These are the right settings in this scenario:

<property name="server" value="ldap://localhost" />
<property name="port" value="3489" />
<property name="user" value="cn=ADMIN,dc=com" />
<property name="password" value="..." />

<property name="userIdAttribute" value="userPrincipalName" />
<property name="userFirstNameAttribute" value="givenName" />
<property name="userLastNameAttribute" value="sn" />

<property name="groupIdAttribute" value="cn" />
<property name="groupNameAttribute" value="cn" />

<property name="ldapGroupManagerFactory" ref="platform4WSGroupManagerFactory"/>
<property name="ldapUserManagerFactory" ref="platform4WSUserManagerFactory"/>

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:

        {
            "name": "servicetaskbase",
            "properties": [{
                "id": "servicetaskclass",
                "type": "Choice",
                "title": "Class",
                "value": "",
                "items": [{
                    "id": "ExecuteSqlStmtServiceTask",
                    "title": "SQL Statement",
                    "value": "it.sinesy.activiti.services.ExecuteSqlStmtServiceTask"
                }, {
                    "id": "ExecuteSqlQueryServiceTask",
                    "title": "SQL Query",
                    "value": "it.sinesy.activiti.services.ExecuteSqlQueryServiceTask"
                }, {
                    "id": "ExecuteComponentServiceTask",
                    "title": "Platform Web Service",
                    "value": "it.sinesy.activiti.services.ExecuteComponentServiceTask"
                }],
                "description": "Class that implements the service task logic.",
                "popular": true
            }, {
                "id": "servicetaskexpression",
                "type": "String",
                "title": "Expression",
                "value": "",
                "description": "Service task logic defined with an expression.",
                "popular": true
            }, {
                "id": "servicetaskdelegateexpression",
                "type": "String",
                "title": "Delegate expression",
                "value": "",
                "description": "Service task logic defined with a delegate expression.",
                "popular": true
            }, {
                "id": "servicetaskresultvariable",
                "type": "String",
                "title": "Result variable name",
                "value": "",
                "description": "Process variable name to store the service task result.",
                "popular": true
            }, {
                "id": "servicetaskfields",
                "type": "Complex",
                "title": "Class fields",
                "value": "{ \"totalCount\": 11, \"items\": [{ \"servicetask_field_name\": \"sql\" },{ \"servicetask_field_name\": \"dataSourceName\" },{ \"servicetask_field_name\": \"result\" },{ \"servicetask_field_name\": \"companyId\" },,{ \"servicetask_field_name\": \"siteId\" },{ \"servicetask_field_name\": \"applicationId\" },{ \"servicetask_field_name\": \"httpMethod\" },{ \"servicetask_field_name\": \"url\" },{ \"servicetask_field_name\": \"requestBody\" },{ \"servicetask_field_name\": \"fireError\" },{ \"servicetask_field_name\": \"username\" }] }",
                "description": "Field extensions",
                "popular": true,
                "complexItems": [{
                    "id": "servicetask_field_name",
                    "name": "Name",
                    "type": "String",
                    "value": "",
                    "width": 100,
                    "optional": false
                }, {
                    "id": "servicetask_field_value",
                    "name": "String value",
                    "type": "String",
                    "value": "",
                    "width": 500,
                    "optional": true
                }, {
                    "id": "servicetask_field_expression",
                    "name": "Expression",
                    "type": "String",
                    "value": "",
                    "width": 200,
                    "optional": true
                }]
            }]
        }

explorer/src/css/custom-styles.css

Find the following 2 class definitions and replace them with the following content:

.north_view .x-panel-body,
.x-panel-editor-north .x-panel-body {
    /*height:0px !important;*/
    height:32px !important;
    top: 0px;
}


.x-panel-editor-north .x-panel .x-panel-body {
    /*height:40px !important;*/
    height:0px !important;
}


#editor_header {
  background:url("../img/signavio/smoky/header_background2.png") repeat-x scroll center -4px transparent !important;
  width: 100%;
  overflow:hidden; 
  position: relative;
/*  height: 40px;*/
  height: 0px;

}




/* new css classes */

.x-panel-editor-west .x-panel-body {
  background-color:#FEFEFE !important;
}

.x-tree-node {
  background-color:#FEFEFE !important;
  background: #FEFEFE url(../../libs/ext-2.0.2/resources/images/gray/panel/white-top-bottom.gif) repeat-x scroll 0 0 !important;
}

.x-grid3{position:relative;overflow:hidden;background-color: #FDFDFD !important;}

Configuration files for Activiti Rest

Here there isa file to configure is WEB-INF/classes/db.properties, with the same content described in the previous section.

Apart from it, there is also the file WEB-INF/classes/activiti-context.xml to configure:

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">

    <!-- Comment this if you don't need demo data 
    <bean id="demoDataGenerator" class="org.activiti.rest.service.demo.DemoDataGenerator"
        init-method="init">
        <property name="processEngine" ref="processEngine" />
        <property name="createDemoUsersAndGroups" value="false" />
        <property name="createDemoProcessDefinitions" value="false" />
        <property name="createDemoModels" value="false" />
    </bean>
     -->
     <bean id="utils"
        class="it.sinesy.activiti.util.Utils">
    </bean>

    <bean id="dbProperties"
        class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="location" value="classpath:db.properties" />
        <!-- Allow other PropertyPlaceholderConfigurer to run as well -->
        <property name="ignoreUnresolvablePlaceholders" value="true" />
    </bean>

    <bean id="dataSource"
        class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
        <property name="driverClass" value="${jdbc.driver}" />
        <property name="url" value="${jdbc.url}" />
        <property name="username" value="${jdbc.username}" />
        <property name="password" value="${jdbc.password}" />
    </bean>

    <bean id="transactionManager"
        class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
        <property name="dataSource" ref="dataSource" />
    </bean>

    <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">

                <property name="dataSource" ref="dataSource" />
                <property name="transactionManager" ref="transactionManager" />
                <property name="databaseSchemaUpdate" value="true" />
                <property name="mailServerPort" value="..." />
                <property name="jobExecutorActivate" value="false" />
                <property name="mailServerPassword" value="..." />
                <property name="mailServerUsername" value="..." /-->
                <property name="mailServerHost" value="..." />
                <property name="mailServerPassword" value="..." />
                <property name="mailServerUsername" value="..." />

                <property name="jobExecutorActivate" value="false" />
                <property name="configurators">

          <list>
              <bean class="org.activiti.ldap.LDAPConfigurator">

                <!-- Server connection params -->
                <property name="server" value="ldap://localhost" />
                <property name="port" value="3389" />
                        <property name="user" value="cn=ADMIN,dc=com" />
                    <property name="password" value="..." />    
                <!-- Query params -->
                <property name="baseDn" value="dc=com" />
                    <property name="queryUserByUserId" value="(&amp;(objectClass=person)(cn={0}))" />
                <!--
                <property name="queryUserByUserId" value="(&(objectClass=inetOrgPerson)(uid={0}))" />
                <property name="queryUserByFullNameLike" value="(&(objectClass=inetOrgPerson)(|({0}=*{1}*)({2}=*{3}*)))" />
                -->
                <!--
                <property name="queryGroupsForUser" value="(&(objectClass=groupOfUniqueNames)(uniqueMember={0}))" />
                -->
                <!-- Attribute config -->
                <property name="userIdAttribute" value="userPrincipalName" />
                <property name="userFirstNameAttribute" value="givenName" />
                <property name="userLastNameAttribute" value="sn" />

                <property name="groupIdAttribute" value="cn" />
                <property name="groupNameAttribute" value="cn" />

            <property name="ldapGroupManagerFactory" ref="platform4WSGroupManagerFactory"/>
            <property name="ldapUserManagerFactory" ref="platform4WSUserManagerFactory"/>


              </bean>
          </list>
        </property>
    </bean>



  <bean id="ldapConfigBean" class="org.activiti.ldap.LDAPConfigurator" />
  <bean id="platform4WSGroupManagerFactory" class="it.sinesy.activiti.authorizations.Platform4WSGroupManagerFactory" >
      <constructor-arg type="org.activiti.ldap.LDAPConfigurator" ref="ldapConfigBean" />
      <constructor-arg type="org.springframework.jdbc.datasource.SimpleDriverDataSource" ref="dataSource" />
    </bean>
    <bean id="platform4WSUserManagerFactory" class="it.sinesy.activiti.authorizations.Platform4WSUserManagerFactory" >
      <constructor-arg type="org.activiti.ldap.LDAPConfigurator" ref="ldapConfigBean" />
      <constructor-arg type="org.springframework.jdbc.datasource.SimpleDriverDataSource" ref="dataSource" />
  </bean>
    <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
        <property name="processEngineConfiguration" ref="processEngineConfiguration" />
    </bean>

</beans>

Note: comment the section about the demo data.

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:

https://github.com/Activiti/Activiti/releases/download/activiti-5.22.0/activiti-5.22.0.zip
http://localhost:activitiport/
https://serverhost/activiti-explorer