AnsweredAssumed Answered

customSessionFactories don't work?  activiti 5.14?

Question asked by li6151770 on Nov 24, 2013
Latest reply on Oct 23, 2014 by danilo.mendez
hi,
I am new to Activiti .
when using activiti5.14, then the configuration is as follows:
1.
<bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
           <property name="customSessionFactories"> 
           <list> 
               <bean class="com.flow.service.activiti.CustomUserEntityManagerFactory"></bean>
           </list> 
        </property>
</bean>

2.
public class CustomUserEntityManagerFactory implements SessionFactory {
    @Autowired
    private CustomUserEntityManager customUserEntityManager;
   
    public Class<?> getSessionType() {
        return UserEntityManager.class;
    }
   
    public Session openSession() {
        return customUserEntityManager;
    }
}

3.
@Service
public class CustomUserEntityManager extends UserEntityManager {
    public Boolean checkPassword(String userId, String password) {
        System.out.println(userId+"====="+password);//??????????????? no-run??
        return super.checkPassword(userId, password);
    }
}

But when I call "identityService.checkPassword(test, 123456)", I configure CustomUserEntityManager doesn't work,
Program still run the default UserEntityManager, why not run my configuration?

Please help.

Outcomes