AnsweredAssumed Answered

Even after customize user and group, IdentityService still create user in act_id_user and group in act_id_group table

Question asked by harishashim on Jan 3, 2016
Latest reply on Jan 5, 2016 by jbarrez
This question about doing own custom user and group table is very popular with Activiti. So I am proud the be the first guy in 2016 to ask this question again!

What I have done so far is extend ProcessEngineFactoryBean

public class ProcessEngineFactoryBeanX extends ProcessEngineFactoryBean {

   UserDao userDao;

   GroupDao groupDao;

   public ProcessEngineFactoryBeanX() {

   public ProcessEngine getObject() throws Exception {

      ProcessEngine processEngineObject = super.getObject();
      Map<Class<?>, SessionFactory> sF =((ProcessEngineConfigurationImpl)             

      //There should be error thrown here if sF is null

      CustomUserEntityManagerFactory userEntityManagerFactory = new CustomUserEntityManagerFactory(

      CustomGroupEntityManagerFactory groupEntityManagerFactory = new CustomGroupEntityManagerFactory(
      if (!sF.containsKey(CustomUserEntityManager.class)) {

      if (!sF.containsKey(CustomGroupEntityManager.class)) {

      return processEngineObject;

And then inject the above as configuration beans bellow

public class ProcessEngineConfig {
   ProcessEngineConfigurationImpl processEngineConfiguration;

   public ProcessEngineFactoryBean processEngineFactoryBean(){
      ProcessEngineFactoryBean bean = new ProcessEngineFactoryBeanX();
      return bean;

I am pretty confident that the above works. And my custom manager and factory is now injected

However when I test with bellow code, user and group is still created in  act_id_user and act_id_group table.

   InitializingBean usersAndGroupsInitializer(
         final IdentityService identityService) {

      final Logger log = LoggerFactory.getLogger(this.getClass());

      return new InitializingBean() {
         public void afterPropertiesSet() throws Exception {

            Group group = identityService.newGroup("user");

            User admin = identityService.newUser("rootadmin");


What should then be my conclusion? Can I conclude that

- my customized identity service using own user and group table is not working?


- whatever my customization, IdentityService will always create user and group in   act_id_user and act_id_group table?