cancel
Showing results for 
Search instead for 
Did you mean: 

How can i customize ACT_ID_USER table?

vamsinipun
Star Contributor
Star Contributor

Hi Team,

     I am using activiti process in my spring project. In my spring project already i have users table but activiti given ACT_ID_USER table. is it possible to use my spring table instead of ACT_ID_USER?

if not possilbe i will maintain both tables. any solution for this?

8 REPLIES 8

fegor
Star Collaborator
Star Collaborator

Why do not use LDAP?

vamsinipun
Star Contributor
Star Contributor

Thank you for your reply. please share any link about that.

fegor
Star Collaborator
Star Collaborator

1. Install OpenLDAP or other

2. Create your users in this ldap with fields as you need (schemas)

2. Configure your Activiti for autentication in ldap

One tutorial for config for Activiti in LDAP by Thys Michels: Activiti BPM Tutorial – LDAP | Thys Michels Blog 

vamsinipun
Star Contributor
Star Contributor

Sorry. it is not full fill my requirement. I am using spring security and created my own mysql user table. is there any possibility to use my own mysql user table?

fegor
Star Collaborator
Star Collaborator

I think is very hard but if you modify the Activiti users table and appended new fields... the problem is recover this information.

richard9527
Champ in-the-making
Champ in-the-making

By the way, for the sake of security, the database of my company disable all the adhoc query and only support procedure.In this state, is the only way to rewrite all the service?

ryandawson
Elite Collaborator
Elite Collaborator

I guess you're using v5 or v6. You could consider implementing a custom IdentityService - see https://blog.canang.com.my/2016/05/12/custom-identityservice/  or GitHub - qbast/activiti-keycloak: Integration of activiti users and groups with keycloak . That is suggested in  , which seems to be much the same question.

vgaur
Confirmed Champ
Confirmed Champ

As Ryan suggested above you can  extend UserEntity manager and create your own   provider which can look into your table and provide user info.

org.activiti.engine.impl.persistence.entity.UserEntityManager
public class CustomUserEntityManager extends UserEntityManager{
//Your implementation by going through your user table
}

You can then create a factory implementation like this

public class CustomUserEntityManagerFactory implements SessionFactory {

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

@Override
  public Session openSession() {
    CustomUserEntityManager aUserEntityManager = new CustomUserEntityManager();
   return (Session) aUserEntityManager;
  }
}

and then can inject this is process configuration using

processEngineConfiguration.setCustomSessionFactories(customSessionFactory)

Thanks

-Vishal