@Test
public void testGroup() throws Exception{
IdentityService identityService = activitiRule.getIdentityService();
Group group = identityService.newGroup("deptLeader");
group.setName("部门领导");
group.setType("assignment");
identityService.saveGroup(group);
List<Group> groupList = identityService.createGroupQuery().groupId("deptLeader").list();
System.out.println("+++++++++++++++++"+groupList.size());
identityService.deleteGroup("deptLeader");
groupList = identityService.createGroupQuery().groupId("deptLeader").list();
System.out.println("++++++++++++++++++"+groupList.size());
}
activit中,组的类型分为两种,即assignment和security-role,前者为一种普通的岗位角色,使用户分配业务中的功能权限,后者时安全角色,可以从全局管理用户组织及整个流程的状态