jerryfiunam (61) [Avatar] Offline
#1
Hi again:

I downloaded activiti 5.13 today and I experienced some problems with my User and Group custom services that I have.

According to the notes, there is a new LDAP support but in the page it is mentioned that "the 'old' way of configuring LDAP still works. More specifically, the simplified configuration is just a wrapper on top of the 'old' infrastructure". I changed activiti to 5.13 version and unfortuunatelly my authentication did not work anymore smilie. I tried to fix this using the new way to wire all this but unfortunatelly did not work again, I wonder if I am doing something wrong. Before this change with activiti 5.12 I had this:

activiti.xml

<property name="customSessionFactories">
<list>
<bean class="org.banxico.dgasf.espifbpm.aplicacion.identity.LDAPUserManagerFactory" />
<bean class="org.banxico.dgasf.espifbpm.aplicacion.identity.LDAPGrupoManagerFactory"/>
</list>
</property>

My LDAPUserManagerFactory was this:

public class LDAPUserManagerFactory implements SessionFactory
{
public LDAPUserManagerFactory()
{

}

@Override
public Class<?> getSessionType()
{
return UserEntityManager.class;
}

@Override
public Session openSession()
{
return new LDAPUserManager();
}
}

and my LDAPGroupManagerFactory was this:

public class LDAPGrupoManagerFactory implements SessionFactory
{
public LDAPGrupoManagerFactory()
{

}

@Override
public Class<?> getSessionType()
{
return GroupEntityManager.class;
}

@Override
public Session openSession()
{
return new LDAPGroupManager();
}
}


In order to adapt to the new way you describe, these are my changes:

activiti.xml

<bean id="ldapConfigBean" class="org.activiti.ldap.LDAPConfigurator" />

<bean id="userManagerFactoryBean" class="org.banxico.dgasf.espifbpm.aplicacion.identity.LDAPUserManagerFactory">
<constructor-arg name="ldapConfigurator" ref="ldapConfigBean" />
</bean>

<bean id="groupManagerFactoryBean" class="org.banxico.dgasf.espifbpm.aplicacion.identity.LDAPGrupoManagerFactory">
<constructor-arg name="ldapConfigurator" ref="ldapConfigBean" />
</bean>

<property name="configurators">
<list>
<bean class="org.activiti.ldap.LDAPConfigurator">
<property name="ldapUserManagerFactory" ref="userManagerFactoryBean"/>
<property name="ldapGroupManagerFactory" ref="groupManagerFactoryBean"/>
</bean>
</list>
</property>

My final LDAPUserManagerFactory is this:

public class LDAPUserManagerFactory extends org.activiti.ldap.LDAPUserManagerFactory
{
public LDAPUserManagerFactory(LDAPConfigurator ldapConfigurator)
{
super(ldapConfigurator);
}

@Override
public Class<?> getSessionType()
{
return UserEntityManager.class;
}

@Override
public Session openSession()
{
return new LDAPUserManager();
}
}

and finally my final LDAPGroupManagerFactory is this:

public class LDAPGrupoManagerFactory extends org.activiti.ldap.LDAPGroupManagerFactory
{
public LDAPGrupoManagerFactory(LDAPConfigurator ldapConfigurator)
{
super(ldapConfigurator);
}

@Override
public Class<?> getSessionType()
{
return GroupEntityManager.class;
}

@Override
public Session openSession()
{
return new LDAPGroupManager();
}
}

When I tried this changes authentication did not work anymore again. I wonder if I am doing something wrong or something is missing. I hope you can help me.

I wonder if you can tell me exactly what is the change I have to perform in order to keep my custom User and Group Service working. This is kind of urgent smilie.

Additinally I downloaded the activiti-ldap.jar from this URL:

https://maven.alfresco.com/nexus/content/groups/public/org/activiti/activiti-ldap/5.13/

Thanks in advanced.

Jerry
jerryfiunam (61) [Avatar] Offline
#2
Re: Problems with Activiti 5.13 and my custom User and Gropu Identity Impl.
it worths mentioning that my User implementation uses LDAP but My Group Implementation uses a DB table.
jerryfiunam (61) [Avatar] Offline
#3
Re: Problems with Activiti 5.13 and my custom User and Gropu Identity Impl.
Just a doubt:

If I upgrade to activiti 5.13, without any change in my code, the use of <property name="customSessionFactories"> should be still working? This is beacuse I dont understand well the sense of this in the user manual:

"the 'old' way of configuring LDAP still works. More specifically, the simplified configuration is just a wrapper on top of the 'old' infrastructure"

I understand that it should be still working in that way with this new version, but actually not smilie, it is not working anymore. Is it needed to perform specific changes in order yo make my User and Group implementations working?

I tried everything and I can not make it work smilie.


I will keep using activiti 5.12 meanwhile. I hope you can help me with this issue bacuse 5.13 have a lot of functionality I would like to use smilie but I cant because of this problem.

Thanks in advanced smilie.

Jerry
tijs.rademakers (494) [Avatar] Offline
#4
Re: Problems with Activiti 5.13 and my custom User and Gropu Identity Impl.
Hi Jerry,

What error message do you get?
What should be changed is the session type. This should be change to GroupIdentityManager and UserIdentityManager instead of GroupEntityManager and UserEntityManager. Let me know if you still run into issues.

Best regards,

Tijs
jerryfiunam (61) [Avatar] Offline
#5
Re: Problems with Activiti 5.13 and my custom User and Gropu Identity Impl.
Hi Tijs,

Thanks a lot for your replay, actually that changes were what I missed smilie. With these changes now it works perfectly again smilie.

Thank you very much for your support smilie.

Regards,

Jerry