当我使用activit6时,我是初学者,我按照下面的代码
<bean id="processEngineConfiguration" class="...SomeProcessEngineConfigurationClass">
...
<property name="customSessionFactories">
<list>
<bean class="com.mycompany.MyGroupManagerFactory"/>
<bean class="com.mycompany.MyUserManagerFactory"/>
</list>
</property>
...
public class MyCompanyGroupManager extends GroupEntityManager {
private static Logger log = LoggerFactory.getLogger(MyCompanyGroupManager.class);
@Override
public List<Group> findGroupsByUser(String userId) {
log.debug("findGroupByUser called with userId: " + userId);
return super.findGroupsByUser(userId);
}
@Override
public List<Group> findGroupByQueryCriteria(GroupQueryImpl query, Page page) {
log.debug("findGroupByQueryCriteria called, query: " + query + " page: " + page);
return super.findGroupByQueryCriteria(query, page);
}
@Override
public long findGroupCountByQueryCriteria(GroupQueryImpl query) {
log.debug("findGroupCountByQueryCriteria called, query: " + query);
return super.findGroupCountByQueryCriteria(query);
}
@Override
public Group createNewGroup(String groupId) {
throw new UnsupportedOperationException();
}
@Override
public void deleteGroup(String groupId) {
throw new UnsupportedOperationException();
}
}
但我发现某些API无效,例如GroupIdentityManager
类不存在。除GroupEntityManager
更新界面外,我应该如何实现自定义身份管理?非常感谢
答案 0 :(得分:0)
我在github
中找到了答案解决方案如下:
实施GroupDataManager
界面。或者,扩展MybatisGroupDataManager.class
ProcessEngineConfigurationImpl.setGroupDataManager(GroupDataManager groupDataManager)