AnsweredAssumed Answered

Problem with customSessionFactories

Question asked by pred05 on Apr 22, 2015
Latest reply on Apr 29, 2015 by pred05
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

Outcomes