How to use custom user and group

My system has user table and group table, I don’t want to use flowable v6.0.0 identity tables like act_id_***. If I don’t use act_id_*** tables, can I use this configuration:

<bean id="processEngineConfiguration" class="org.flowable.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
  <property name="disableIdmEngine" value="true" />
  ...
</bean>

I implement UserEntityManager and SessionFactory.

@Component
public class CustomUserManager implements UserEntityManager {

    @Autowired
    private UserService userService;
......
}


@Service
public class CustomUserManagerFactory implements SessionFactory {

    @Autowired
    private CustomUserManager customUserManager;

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

    @Override
    public Session openSession(AbstractCommandContext abstractCommandContext) {
        return customUserManager;   //return fail
    }
}

custom session factory add to processEngineConfiguration.

<bean id="processEngineConfiguration"
          class="org.flowable.spring.SpringProcessEngineConfiguration">
        ......
        <property name="disableIdmEngine" value="true" />
        <property name="customSessionFactories">
            <list>
                <bean class="org.flowable.custom.CustomUserManagerFactory" />
                <bean class="org.flowable.custom.CustomGroupManagerFactory" />
            </list>
        </property>
      ......
    </bean>

I am a flowable newcomer, can you give me a exmple? Thanks.

1 Like

Hi,

Yes you should indeed use disableIdmEngine=true.
The flowable-ldap module shows how you can override the IdmIdentityService and implement your own idm logic. This section in the user guide also described this -> http://www.flowable.org/docs/userguides/userguide/index.html#_idm_engine_configuration

Best regards,

Tijs

Dear zhanyuerong,
Can you give more details on how you implemented your own logic for idm? I’m in the same situation and i came across this post. I would appreciate a more detailed explanation/code example. I want to integrate this new idm logic with Spring and oracle. Thank you very much.