How can i customize ACT_ID_USER table?

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
vamsinipun
Established Member

How can i customize ACT_ID_USER table?

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
fegor
Established Member II

Re: How can i customize ACT_ID_USER table?

Why do not use LDAP?

vamsinipun
Established Member

Re: How can i customize ACT_ID_USER table?

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

fegor
Established Member II

Re: How can i customize ACT_ID_USER table?

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
Established Member

Re: How can i customize ACT_ID_USER table?

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
Established Member II

Re: How can i customize ACT_ID_USER table?

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

richard9527
Member II

Re: How can i customize ACT_ID_USER table?

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
Senior Member II

Re: How can i customize ACT_ID_USER table?

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
Member II

Re: How can i customize ACT_ID_USER table?

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