cancel
Showing results for 
Search instead for 
Did you mean: 

Microsoft Active Directory Integration in Activiti 5.18

nu2activiti
Champ in-the-making
Champ in-the-making
Hello,

I have searched and read the available related articles thoroughly but no luck.

I get the error as


org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoDataConfiguration': Invocation of init method failed; nested exception is org.activiti.engine.ActivitiIllegalArgumentException: This query is not supported by the LDAPGroupManager

Caused by: org.activiti.engine.ActivitiIllegalArgumentException: This query is not supported by the LDAPGroupManager



Following is what my activiti-custom-context.xml looks like



<?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" xmlns:aop="http://www.springframework.org/schema/aop"
  xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
       http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd">
<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>

     <!– Following added for LDAP Integration : start –>
     <property name="configurators">
          <list>
              <bean class="org.activiti.ldap.LDAPConfigurator">

                <!– Server connection params –>
                <property name="server" value="ldap://KFXDC01.corp.ABCDE.com" />
                <property name="port" value="389" />
                <property name="user" value="CN=ServiceAdmin,CN=Users,DC=corp,DC=ABCDE,DC=com" />
                <property name="password" value="******" />


                <!– Query params –>
                <property name="baseDn" value="DC=corp,DC=ABCDE,DC=com" />
                <property name="queryUserByUserId" value="(&amp;(objectClass=person)(sAMAccountName={0}))" />
            <property name="queryGroupsForUser" value="(&amp;(objectClass=group)(member={0}))"/>      
                <!– Attribute config –>
                <property name="userIdAttribute" value="sAMAccountName" />
                <property name="userFirstNameAttribute" value="givenName" />
                <property name="userLastNameAttribute" value="sn" />

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

              </bean>
          </list>
      </property>
   <!– Following added for LDAP Integration : end –>
  </bean>

<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>Groups</value>
       </list>
    </property>
    <property name="userGroups">
      <list>
        <value>user</value>
      </list>
    </property>   
  </bean>
  </beans>


Please assist am stuck here.

Thanks in advance
4 REPLIES 4

jbarrez
Star Contributor
Star Contributor
You need to comment out the demo data configuration, which creates the default users.
With an LDAP server, this is not needed.

nu2activiti
Champ in-the-making
Champ in-the-making
Thanks jbarrez for taking your time out.

I tried this
<code>
# demo data properties
create.demo.users=false
</code>
which I think is equivalent to the following

<code>
<bean id="demoDataGenerator" class="org.activiti.explorer.demo.DemoDataGenerator" init-method="init">
<property name="processEngine" ref="processEngine" />

<!– Set following properties to false if certain demo data is not wanted –>
<property name="createDemoUsersAndGroups" value="false" />
</bean>
</code>

Now that error is not there but still I cannot login using my username and password.

Please help.

nu2activiti _ ,

Please if you have found a solution post it for me.

Regards

Wassim

jbarrez
Star Contributor
Star Contributor
Yes, either that or simply comment out the whole demoDataGenerator.

"I cannot login using my username and password."

And you are using your LDAP user/pass correctly? Do you see anything in the logs? If your LDAP config is correct, it should allow you to use the LDAP credentials.