cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with customSessionFactories

pred05
Champ in-the-making
Champ in-the-making
Hi everybody,
i want to use my own system of user, i have implement two SessionFactory (GroupFactory and UserFactory) as in the User Guide. i have implement the UserEntityManager and the GroupEntityManager. i think the problem is not here but in my activiti configuration file.

When i want to return all my user. The query always return the user in the h2 Database (kermit,…).

processEngine.getIdentityService().createUserQuery().list().get(0).getId()


In the activiti.cfg.xml i have put the two factory :

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans.xsd">

  <bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">

   <property name ="customSessionFactories">
        <list>
           <bean class="lu.poc.user.sessionfactory.POCGroupManagerFactory"/>
           <bean class="lu.poc.user.sessionfactory.POCUserManagerFactory"/>
        </list>
     </property>


   <property name="jdbcUrl" value="jdbc:h2:tcp://localhost/~/activiti" />
    <property name="jdbcDriver" value="org.h2.Driver" />
    <property name="jdbcUsername" value="sa" />
    <property name="jdbcPassword" value="" />

    <property name="databaseSchemaUpdate" value="true" />

    <property name="jobExecutorActivate" value="true" />
    <property name="asyncExecutorEnabled" value="true" />
    <property name="asyncExecutorActivate" value="true" />

    <property name="mailServerHost" value="mail.my-corp.com" />
    <property name="mailServerPort" value="5025" />
   
    <property name="beans">
       <map>
            <entry key="POCBPMService" value-ref="POCBPMService" />
       </map>
     </property>
 
  </bean>
  <bean id="POCBPMService" class="lu.poc.workflow.servicetask.POCBPMService"/>
</beans>


Thanks for help!
Sorry for my english :s
2 REPLIES 2

trademak
Star Contributor
Star Contributor
Hi,

The configuration looks fine. Can you share more code?

Best regards,

pred05
Champ in-the-making
Champ in-the-making
Thanks for help, i have find the problem.
Instead of set in the factory :
<code>UserIdentityManager.class;</code>

i have set
<code>UserEntityManager.class;</code>

It is a stupid error but hard to find hihi