AnsweredAssumed Answered

configuring ldap

Question asked by slag on Mar 23, 2015
Latest reply on Apr 11, 2016 by andre1
I'm trying to connect activiti 5.17.0 to my ldap server.

According to the documentation (http://www.activiti.org/userguide/) I need to modify activiti-standalone-context.xml.
This file is however not present in after version 5.16.4.


I added the following configuration to activiti-custom-context.xml.

  <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="enableDatabaseEventLogging" value="true" />
        <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="192.168.1.106" />
                <property name="port" value="389" />
                <property name="user" value="uid=admin,dc=newtec,dc=eu" />
                <property name="password" value="secret" />
                <!– Query params –>
                <property name="baseDn" value="ou=people,ou=intranet,dc=newtec,dc=eu" />
                <property name="queryUserByUserId" value="(&amp;(objectClass=inetOrgPerson)(uid={0}))" />
                <property name="queryUserByFullNameLike" value="(&amp;(objectClass=inetOrgPerson)(|({0}=*{1}*)({2}=*{3}*)))" />
                <property name="queryGroupsForUser" value="(&amp;(objectClass=groupOfNames)(Member={0}))" />
                <!– Attribute config –>
                <property name="userIdAttribute" value="uid" />
                <property name="userFirstNameAttribute" value="cn" />
                <property name="userLastNameAttribute" value="sn" />
                <property name="groupIdAttribute" value="cn" />
                <property name="groupNameAttribute" value="cn" />
             </bean>
          </list>
        </property>
  </bean>


and the following to activiti-ui-context.xml


  <bean name="explorerApp" class="org.activiti.explorer.ExplorerApp" scope="session">
    <property name="environment" value="${activiti.ui.environment}" />
    <property name="useJavascriptDiagram" value="${activiti.ui.jsdiagram}" />
    <property name="i18nManager" ref="i18nManager" />
    <property name="viewManager" ref="viewManager" />
    <property name="notificationManager" ref="notificationManager" />
    <property name="attachmentRendererManager" ref="attachmentRendererManager" />
    <property name="formPropertyRendererManager" ref="formPropertyRendererManager" />
    <property name="variableRendererManager" ref="variableRendererManager" />
    <property name="applicationMainWindow" ref="mainWindow" />
    <property name="componentFactories" ref="componentFactories" />
    <property name="workflowDefinitionConversionFactory" ref="workflowDefinitionConversionFactory" />
    <property name="loginHandler" ref="activitiLoginHandler" />
    <property name="simpleWorkflowJsonConverter" ref="simpleWorkflowJsonConverter" />
    <property name="adminGroups">
       <list>
         <value>admin</value>
       </list>
    </property>
    <property name="userGroups">
      <list>
        <value>user</value>
      </list>
    </property>
  </bean>


At startup i get the following error in catalina.out which results in explorer not running.

12:06:39,725 [localhost-startStop-1] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML bean definitions from class path resource [activiti-ui-context.xml]
12:06:39,897 [localhost-startStop-1] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML bean definitions from class path resource [activiti-login-context.xml]
12:06:39,932 [localhost-startStop-1] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML bean definitions from class path resource [activiti-custom-context.xml]
23-Mar-2015 12:06:39.964 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Error listenerStart
23-Mar-2015 12:06:39.977 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/activiti-explorer] startup failed due to previous errors
12:06:39,980 [localhost-startStop-1] INFO  org.activiti.explorer.servlet.WebConfigurer  - Destroying Web application


When i remove the LDAP part from activiti-custom-context.xml it starts up normal.

Any help is welcome.

Outcomes