cancel
Showing results for 
Search instead for 
Did you mean: 

Integrate LDAP with Activiti Explorer

thysmichels
Champ in-the-making
Champ in-the-making
I have been reading the latest documentation to integrate LDAP into Explorer but have some questions:

1. Add the activiti-ldap jar to WEB-INF/lib
Do I add it to my local project or to explorer war?And will the ldap.jar be included when I build the bar?

2. Add following configuration to the explorerApp bean in activiti-ui.context:

<property name="adminGroups">
  <list>
    <value>admin</value>
  </list>
  </property>
  <property name="userGroups">
    <list>
      <value>user</value>
    </list>
</property>                       
                      
Where do I find the explorerApp bean?And where is activiti-ui.context?

If someone has an example or blog post please direct me to it.
5 REPLIES 5

jbarrez
Star Contributor
Star Contributor
> Do I add it to my local project or to explorer war?And will the ldap.jar be included when I build the bar?

Ok, let me clarify
- are you building a custom web application? If so, add it to your project
- are you planning on using Explorer? If so, add it to the explorer classpath
- the ldap jar wil NOT be included in the bar file. Bar files have nothing to do with classpath!

> Where do I find the explorerApp bean?And where is activiti-ui.context?

In the WEB-INF/classes folder of the Explorer application.

thysmichels
Champ in-the-making
Champ in-the-making
Thanks for the clarification I made the changes. My activiti-standalone-context.xml looks like:

<code>
<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="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="ldap://localhost" />
                <property name="port" value="10389" />
                <property name="user" value="uid=admin,ou=system" />
                <property name="password" value="secret" />
               
                <!– Query params –>
                <property name="baseDn" value="" />
                <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=groupOfUniqueNames)(uniqueMember={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>
</code>

<code>
<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>
</code>

Works great thanks.

marimuthupandi
Champ in-the-making
Champ in-the-making
do we need to add any line in POM.XML file ?

susanchen
Champ in-the-making
Champ in-the-making
I have a trouble, when I configuring LDAP. Please refer to the attachment.
Who can help me? Thanks.
org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'java.util.ArrayList' to required type 'java.util.List' for property 'configurators'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.activiti.ldap.LDAPConfigurator] to required type [org.activiti.engine.cfg.ProcessEngineConfigurator] for property 'configurators[0]': no matching editors or conversion strategy found

rkggroup
Champ in-the-making
Champ in-the-making

Hi Susan,

I am facing same issue.  

Have you resolved this ?