cancel
Showing results for 
Search instead for 
Did you mean: 

Own UserManagement -problem with using tx:annotation-driven

udoderk
Champ in-the-making
Champ in-the-making
Hi all,
i wish to realize user management with own tables in other database for user and user groups for activiti explorer using declarative approach for transactions with additional transaction mananger.
Into activiti explorer must be possible only change user email and password. But i have the problem with declarative approach for transactions :evil:  :evil:

if i use declarative approach for transactions (also turn on via <tx:annotation-driven transaction-manager="myTransactionManager"/> in spring configuration ) the Cannot convert value of type [$Proxy6 implementing org.activiti.engine.impl.interceptor.Session,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [com.driveit.CustomUserManager  exception will be thrown :shock:

Caused by: org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type '$Proxy6 implementing org.activiti.engine.impl.interceptor.Session,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised' to required type 'com.driveit.CustomUserManager' for property 'customUserManager'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [$Proxy6 implementing org.activiti.engine.impl.interceptor.Session,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [com.driveit.CustomUserManager] for property 'customUserManager': no matching editors or conversion strategy found   at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:485)   at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:516)   at org.springframework.beans.BeanWrapperImpl.convertForProperty(BeanWrapperImpl.java:510)   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty(AbstractAutowireCapableBeanFactory.java:1406)   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1365)   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)   at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)   … 51 moreCaused by: java.lang.IllegalStateException: Cannot convert value of type [$Proxy6 implementing org.activiti.engine.impl.interceptor.Session,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [com.driveit.CustomUserManager] for property 'customUserManager': no matching editors or conversion strategy found   at org.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:241)   at org.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:470)   … 57 more‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
The my user manager is registered as bean in spring configuration (beacuse it is needed imho for @Transacitonal ).

If i comment out this tx:annotation-driven setting, the my user manager will be correctly  injected.  :!:

But the declarative transactional management is turned off :-((

What is wrong???

Thanks a lot for your help!!!

P.S The classes and configs

package com.driveit;import java.util.List;import org.activiti.engine.identity.Group;import org.activiti.engine.identity.User;import org.activiti.engine.identity.UserQuery;import org.activiti.engine.impl.Page;import org.activiti.engine.impl.UserQueryImpl;import org.activiti.engine.impl.persistence.entity.IdentityInfoEntity;import org.activiti.engine.impl.persistence.entity.UserEntity;import org.activiti.engine.impl.persistence.entity.UserManager;import org.springframework.transaction.annotation.Transactional;public class CustomUserManager extends UserManager {   @Override   public User createNewUser(String userId) {      // TODO Auto-generated method stub      return super.createNewUser(userId);   }// other methods of "activiti"-UserManager }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

custom factory
import org.activiti.engine.impl.interceptor.Session;import org.activiti.engine.impl.interceptor.SessionFactory;public class CustomUserManagerFactory implements SessionFactory {   CustomUserManager customUserManager;   public Class<?> getSessionType() {      // original UserManager      return org.activiti.engine.impl.persistence.entity.UserManager.class;   }   public void setCustomUserManager(CustomUserManager customUserManager) {      this.customUserManager = customUserManager;   }   public Session openSession() {      // Customized UserManger extended from      // org.activiti.engine.impl.persistence.entity.UserManager      return customUserManager;   }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Spring configuration
….   <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="myDataSource" 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="myTransactionManager"      class="org.springframework.jdbc.datasource.DataSourceTransactionManager">      <property name="dataSource" ref="myDataSource" />   </bean><!– <tx:annotation-driven transaction-manager="myTransactionManager"/> –>   <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" />         </list>      </property>      <property name="customSessionFactories">         <list>            <ref bean="myCustomUserManagerFactory" />            <!– <bean class="com.driveit.CustomUserManagerFactory" /> <bean class="com.your.app.CUstomGroupManagerFactory"                /> –>         </list>      </property>   </bean>   <bean id="myCustomUserManager" class="com.driveit.CustomUserManager">   </bean>   <bean id="myCustomUserManagerFactory" class="com.driveit.CustomUserManagerFactory">      <property name="customUserManager" ref="myCustomUserManager" />   </bean>….‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

whole spring configuration :
<?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="true" />      <property name="createDemoProcessDefinitions" value="true" />      <property name="createDemoModels" value="true" />   </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="myDataSource" 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="myTransactionManager"      class="org.springframework.jdbc.datasource.DataSourceTransactionManager">      <property name="dataSource" ref="myDataSource" />   </bean><!– <tx:annotation-driven transaction-manager="myTransactionManager"/> –>   <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" />         </list>      </property>      <property name="customSessionFactories">         <list>            <ref bean="myCustomUserManagerFactory" />            <!– <bean class="com.driveit.CustomUserManagerFactory" /> <bean class="com.your.app.CUstomGroupManagerFactory"                /> –>         </list>      </property>   </bean>   <bean id="myCustomUserManager" class="com.driveit.CustomUserManager">   </bean>   <bean id="myCustomUserManagerFactory" class="com.driveit.CustomUserManagerFactory">      <property name="customUserManager" ref="myCustomUserManager" />   </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>‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
4 REPLIES 4

udoderk
Champ in-the-making
Champ in-the-making
The problem is, that user manager is just not interface. To avoid cglib black magic ;-)) just an interface must be used as method parameter or as return value of methods, related to user management. That is currenlty is not possible without change of activiti engine and activiti explorer core classes usage of AOP @Transactional annotation.
Thus i change some activiti engine classes and introduce the user manager interface to achieve usage of @Transactional;-))

Firstly, i define the ICustomUserManager interface:

package com.driveit;

import java.util.List;

import org.activiti.engine.identity.Group;
import org.activiti.engine.identity.User;
import org.activiti.engine.identity.UserQuery;
import org.activiti.engine.impl.Page;
import org.activiti.engine.impl.UserQueryImpl;
import org.activiti.engine.impl.db.DbSqlSession;
import org.activiti.engine.impl.db.PersistentObject;
import org.activiti.engine.impl.history.HistoryManager;
import org.activiti.engine.impl.interceptor.Session;
import org.activiti.engine.impl.persistence.entity.AttachmentManager;
import org.activiti.engine.impl.persistence.entity.ByteArrayManager;
import org.activiti.engine.impl.persistence.entity.DeploymentManager;
import org.activiti.engine.impl.persistence.entity.ExecutionManager;
import org.activiti.engine.impl.persistence.entity.GroupManager;
import org.activiti.engine.impl.persistence.entity.HistoricActivityInstanceManager;
import org.activiti.engine.impl.persistence.entity.HistoricDetailManager;
import org.activiti.engine.impl.persistence.entity.HistoricProcessInstanceManager;
import org.activiti.engine.impl.persistence.entity.HistoricTaskInstanceManager;
import org.activiti.engine.impl.persistence.entity.HistoricVariableInstanceManager;
import org.activiti.engine.impl.persistence.entity.IdentityInfoEntity;
import org.activiti.engine.impl.persistence.entity.IdentityInfoManager;
import org.activiti.engine.impl.persistence.entity.IdentityLinkManager;
import org.activiti.engine.impl.persistence.entity.MembershipManager;
import org.activiti.engine.impl.persistence.entity.ModelManager;
import org.activiti.engine.impl.persistence.entity.ProcessDefinitionManager;
import org.activiti.engine.impl.persistence.entity.ResourceManager;
import org.activiti.engine.impl.persistence.entity.TaskManager;
import org.activiti.engine.impl.persistence.entity.UserEntity;
import org.activiti.engine.impl.persistence.entity.UserManager;
import org.activiti.engine.impl.persistence.entity.VariableInstanceManager;

public interface ICustomUserManager extends Session {

// ///from user manager /////
User createNewUser(String userId);

void insertUser(User user);

void updateUser(UserEntity updatedUser);

UserEntity findUserById(String userId);

void deleteUser(String userId);

List<User> findUserByQueryCriteria(UserQueryImpl query, Page page);

long findUserCountByQueryCriteria(UserQueryImpl query);

List<Group> findGroupsByUser(String userId);

UserQuery createNewUserQuery();

IdentityInfoEntity findUserInfoByUserIdAndKey(String userId, String key);

List<String> findUserInfoKeysByUserIdAndType(String userId, String type);

Boolean checkPassword(String userId, String password);

List<User> findPotentialStarterUsers(String proceDefId);

// ///////

// //////////from abstract manager //////////

void insert(PersistentObject persistentObject);

void delete(PersistentObject persistentObject);

DbSqlSession getDbSqlSession();

<T> T getSession(Class<T> sessionClass);

DeploymentManager getDeploymentManager();

ResourceManager getResourceManager();

ByteArrayManager getByteArrayManager();

ProcessDefinitionManager getProcessDefinitionManager();

ModelManager getModelManager();

ExecutionManager getProcessInstanceManager();

TaskManager getTaskManager();

IdentityLinkManager getIdentityLinkManager();

VariableInstanceManager getVariableInstanceManager();

HistoricProcessInstanceManager getHistoricProcessInstanceManager();

HistoricDetailManager getHistoricDetailManager();

HistoricActivityInstanceManager getHistoricActivityInstanceManager();

HistoricVariableInstanceManager getHistoricVariableInstanceManager();

HistoricTaskInstanceManager getHistoricTaskInstanceManager();

UserManager getUserManager();

GroupManager getGroupManager();

IdentityInfoManager getIdentityInfoManager();

MembershipManager getMembershipManager();

AttachmentManager getAttachmentManager();

HistoryManager getHistoryManager();
/////from session ////
void close();

void flush();

}


Then realized own user factory using user manager interface

package com.driveit;

import org.activiti.engine.impl.interceptor.Session;
import org.activiti.engine.impl.interceptor.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;

public class CustomUserManagerFactory implements SessionFactory {
@Autowired
ICustomUserManager customUserManager;

public Class<?> getSessionType() {
  // original UserManager
  return ICustomUserManager.class;
}

public void setCustomUserManager(ICustomUserManager customUserManager) {
  this.customUserManager = customUserManager;
}

public Session openSession() {
  // Customized UserManger extended from
  // org.activiti.engine.impl.persistence.entity.UserManager
  return customUserManager;
}

}



and
user manager

package com.driveit;

import java.util.List;

import org.activiti.engine.identity.Group;
import org.activiti.engine.identity.User;
import org.activiti.engine.identity.UserQuery;
import org.activiti.engine.impl.Page;
import org.activiti.engine.impl.UserQueryImpl;
import org.activiti.engine.impl.persistence.entity.IdentityInfoEntity;
import org.activiti.engine.impl.persistence.entity.UserEntity;
import org.activiti.engine.impl.persistence.entity.UserManager;
import org.springframework.transaction.annotation.Transactional;

public class CustomUserManager extends UserManager implements ICustomUserManager {

@Override
public User createNewUser(String userId) {
  // TODO Auto-generated method stub
  return super.createNewUser(userId);
}

@Override
@Transactional("myTransactionManager")
public void insertUser(User user) {
  // TODO Auto-generated method stub
  super.insertUser(user);
}

@Override
@Transactional("myTransactionManager")
public void updateUser(UserEntity updatedUser) {
  // TODO Auto-generated method stub
  super.updateUser(updatedUser);
}

@Override
public UserEntity findUserById(String userId) {
  // TODO Auto-generated method stub
  return super.findUserById(userId);
}

@Override
public void deleteUser(String userId) {
  // TODO Auto-generated method stub
  super.deleteUser(userId);
}

@Override
public List<User> findUserByQueryCriteria(UserQueryImpl query, Page page) {
  // TODO Auto-generated method stub
  return super.findUserByQueryCriteria(query, page);
}

@Override
public long findUserCountByQueryCriteria(UserQueryImpl query) {
  // TODO Auto-generated method stub
  return super.findUserCountByQueryCriteria(query);
}

@Override
public List<Group> findGroupsByUser(String userId) {
  // TODO Auto-generated method stub
  return super.findGroupsByUser(userId);
}

@Override
public UserQuery createNewUserQuery() {
  // TODO Auto-generated method stub
  return super.createNewUserQuery();
}

@Override
public IdentityInfoEntity findUserInfoByUserIdAndKey(String userId,
   String key) {
  // TODO Auto-generated method stub
  return super.findUserInfoByUserIdAndKey(userId, key);
}

@Override
public List<String> findUserInfoKeysByUserIdAndType(String userId,
   String type) {
  // TODO Auto-generated method stub
  return super.findUserInfoKeysByUserIdAndType(userId, type);
}

@Override
public Boolean checkPassword(String userId, String password) {
  // TODO Auto-generated method stub
  return super.checkPassword(userId, password);
}

@Override
public List<User> findPotentialStarterUsers(String proceDefId) {
  // TODO Auto-generated method stub
  return super.findPotentialStarterUsers(proceDefId);
}

}

Then i adjusted org.activiti.engine.impl.persistence.AbstractManager - change visibility of protected methods to public.

Then i adjusted the org.activiti.engine.impl.interceptor.CommandContext.getUserManager() method as follows:

  public ICustomUserManager getUserManager() {
    return  getSession(ICustomUserManager.class);
  }
(ICustomUserManager  interface will be returned not acitiviti-UserManager)




Then i added the following javas
    /activiti-explorer/src/org/activiti/engine/impl/UserQueryImpl.java
    /activiti-explorer/src/org/activiti/engine/impl/cmd/CheckPassword.java
    /activiti-explorer/src/org/activiti/engine/impl/cmd/CreateUserCmd.java
    /activiti-explorer/src/org/activiti/engine/impl/cmd/CreateUserQueryCmd.java
    /activiti-explorer/src/org/activiti/engine/impl/cmd/DeleteUserCmd.java
    /activiti-explorer/src/org/activiti/engine/impl/cmd/GetUserPictureCmd.java
    /activiti-explorer/src/org/activiti/engine/impl/cmd/SaveUserCmd.java
    /activiti-explorer/src/org/activiti/engine/impl/cmd/SetUserPictureCmd.java
to compile that, because the user manager will be called


The spring activiti configuration:

<?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.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/aop http://www.springframework.org/schema/aop/spring-aop-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="true" />
  <property name="createDemoProcessDefinitions" value="true" />
  <property name="createDemoModels" value="true" />
</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="myDataSource" 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="myTransactionManager"
  class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
  <property name="dataSource" ref="myDataSource" />
</bean>

<tx:annotation-driven transaction-manager="myTransactionManager"/> 

<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" />
   </list>
  </property>

  <property name="customSessionFactories">
   <list>
    <ref bean="myCustomUserManagerFactory" />
    <!– <bean class="com.driveit.CustomUserManagerFactory" /> <bean class="com.your.app.CUstomGroupManagerFactory"
     /> –>
   </list>
  </property>
</bean>

<bean id="myCustomUserManager" class="com.driveit.CustomUserManager">
</bean>
<context:annotation-config/>
<bean id="myCustomUserManagerFactory" class="com.driveit.CustomUserManagerFactory">
<!–  <property name="customUserManager" ref="myCustomUserManager" />  –>
</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>

Same operations must be processed with group manager.[size=150] So such solution is really suboptimal [/size]without support from activiti core side (but this is not planned currenlty)

P.S i tested successfully the startup and add the new user to activiti

jbarrez
Star Contributor
Star Contributor
Hmm i see your point. I'm wondering if there is an 'easy' solution to this without breaking too much stuff.

Would you mind creating a new Jira issue so we can discuss further there and we could plan it if we come to consensus?

udoderk
Champ in-the-making
Champ in-the-making
Hmm i see your point. I'm wondering if there is an 'easy' solution to this without breaking too much stuff.

Would you mind creating a new Jira issue so we can discuss further there and we could plan it if we come to consensus?
Ok:-)
the issue New UserManagement API for usage with Spring AOP http://jira.codehaus.org/browse/ACT-1650 was created.

Thanks a lot for your replay!

jbarrez
Star Contributor
Star Contributor
Thanks. I think it was a design mistake anyway not to make that code an interface.