I have a webapp which has user/group functions, and existing user/group data.
I want to use Activiti the process engine, however, it seems Activiti manage user/group info itself.
Should I:
RepositoryService
, IdentityService
, etc., and recompile? It seems RepositionServiceImpl
is hard coded in the Activiti sources, and there isn't a setRepositionService()
method in ProcessEngine
.I can't rename the existing db tables, because there are some other apps using them.
I have read the user guide, but I didn't found any information on how to integrate Activiti with existing apps.
I don't know what version you are currently using, but I used your second option successfully with version 5.5, overriding some Activiti classes:
Extend GroupManager
and UserManager
(from package org.activiti.engine.impl.persistence.entity
), and implement the methods you need, using the required DAOs/EntityManager/whatever pointing to your database. Code here: GroupManager / UserManager.
Implement org.activiti.engine.impl.interceptor.SessionFactory.SessionFactory
, for groups and users. Check out code here: ActivitiGroupManagerFactory / ActivitiUserManagerFactory.
Finally, in your activity config you have to set your new SessionFactory classes. I was using spring, so there is my activiti-config bean code: activiti-config.xml (check line 14)
Hope this helps in some way :)
You can check the Lim Chee Kin code to integrate activiti with spring security https://github.com/limcheekin/activiti-spring-security and maybe you can reuse your user/group data with spring security this way you can reuse his code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With