cancel
Showing results for 
Search instead for 
Did you mean: 

Replacing Activiti group, user, membership tables

vire7777
Champ in-the-making
Champ in-the-making
Hi all ^^

I've seen many thread about the subject : "how to change activiti tables by mine" but no real explication on "How to do it". In addition, lot of them explains that changing it could be very unstable in older versions.
That's why i would know if someone could explain me, step by step, if it's possible and how to change the User/Group/Membership tables by mine because i really need Long ids instead of string ones (that you have implemented in your tables).
Sure, i think i would have to change something in the conf file, then to explain which identitySession class activiti must use to do all its group/user queries and create this class but i really don t know exactly what to do.

Then, i think that could be useful if we could have it in the documentation too to help beginners like… me ^^

Thanks a lot for your help
6 REPLIES 6

trademak
Star Contributor
Star Contributor
Hi,

Changing it only to have Long ids instead of String ones seems to be a bit strange to me.
But if you want to implement this yourself you basically have to override the UserManager and GroupManager classes.
In my Activiti in Action book this is explained in details for using a LDAP server. You can look at the book's code examples as well.

Best regards,

vire7777
Champ in-the-making
Champ in-the-making
Thanks
I would read that ^^

vire7777
Champ in-the-making
Champ in-the-making
A question about the article and how to implement it !

I've created a ProcessEngineConfiguration by :
ProcessEngineConfiguration conf = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();
Then i have done some changes like :
conf.setJobExecutorActivate(true);
conf.setDatabaseSchemaUpdate(conf.DB_SCHEMA_UPDATE_TRUE);

But how to add my new customSessionFactories like in your book ?
<property name="customSessionFactories">
<list>
<bean class="org.bpmnwithactiviti.chapter10.ldap.
➥ LDAPUserManagerFactory">
<constructor-arg ref="ldapConnectionParams" />
</bean>
<bean class="org.bpmnwithactiviti.chapter10.ldap.
➥ LDAPGroupManagerFactory">
<constructor-arg ref="ldapConnectionParams" />
</bean>
</list>
</property>

I don't see any getter/setter for that.
Does it exist an other way to create them ?

vire7777
Champ in-the-making
Champ in-the-making
No one can explain me how to integrate the customSessionFactories in my ProcessEngineConfiguration ?
I really see no "setter" method…

trademak
Star Contributor
Star Contributor
Hi,

As you can see it's a property of the ProcessEngineConfigurationImpl class. So if you use the StandaloneProcessEngineConfiguration class you can inject the customSessionFactories on that class.
So just cast the ProcessEngineConfiguration to StandaloneProcessEngineConfiguration.

Best regards,

vire7777
Champ in-the-making
Champ in-the-making
Thanks
Now i ve done it ^^