cancel
Showing results for 
Search instead for 
Did you mean: 

customize group entiy

hemamalini
Champ in-the-making
Champ in-the-making
How can i use groups alone from other system instead of Activiti maintained table. Can some one please provide me example. For eg for the kermit user, if groups are stored in other oracle table , and all group related info alone are maintained by other system, how can i use? LDAP example is bit difficult to understand. Any other sample is available?Please suggest how can i achieve it
9 REPLIES 9

arnoldschrijve1
Champ on-the-rise
Champ on-the-rise

hemamalini
Champ in-the-making
Champ in-the-making
Thank you very much

hemamalini
Champ in-the-making
Champ in-the-making
Hi I am using Activiti Rest app like the one given in Activiti in action source code -bookrestapp.. https://code.google.com/p/activitiinaction/source/browse/trunk/book-rest-app/?r=218#book-rest-app%25.....
How can i include the custom user and groups there? ..

arnoldschrijve1
Champ on-the-rise
Champ on-the-rise
Add reference to your custom identity implementation classes to activiti.cfg.xml

<code>
        <property name="customSessionFactories">
            <list>
                <bean class="com.example.identity.MyGroupManagerFactory"/>
                <bean class="com.example.identity.MyUserManagerFactory"/>
            </list>
        </property>

</code>
Add your implementations of org.activiti.engine.impl.persistence.entity.GroupIdentityManager and org.activiti.engine.impl.persistence.entity.UserIdentityManager in the classpath (or extend from the abstract entity classes). These are your implementations, so they should carry your custom identity solution code.

Don't know which methods of identity manager classes you exactly have to implement. Depends also on the use of identity service. You should look at LDAP implementation.

Now you can use IdentityService to query your own groups/user stores. You'll have to enforce authentication yourself by calling the IdentityService at appropriate times.

hemamalini
Champ in-the-making
Champ in-the-making
Thanks a lot.. i couldnt understand how connection parameters are passed to GroupManager,UserManager. Suppose Connectionparams is a simple pojo that has fields like usename,password,connectionurl. I have a connectionutil to open a connection to db and get users,groups list. So from Groupmanagerfactory,usermanagerfactory , connection parameters should be passed to GroupManager and usermanager  which inturn connects to db and get users and group list. But how connection parameter is set in Groupmanagerfactory,usermanagerfactory

arnoldschrijve1
Champ on-the-rise
Champ on-the-rise
You could create your factories such that you can receive the connection parameters via the constructors and pass them on, then modify the bean definition file to add the params in the constructor.

hemamalini
Champ in-the-making
Champ in-the-making
Thanks. I should customize the findGroupsByUser method alone with my customized groups right? or also findGroupByQueryCriteria method?

arnoldschrijve1
Champ on-the-rise
Champ on-the-rise
Not sure when and how each of those methods are called. You could create dummy implementations that only add logentries and delegate to super() to be sure.

hemamalini
Champ in-the-making
Champ in-the-making
Thanks a lot..I am able to customize the GroupManager now…