11工作流当中的角色组
一、仅做了解
//用户组的处理
public class testusergroup {
private processengine processengine=processengines.getdefaultprocessengine();
//创建用户和用户组
@test
public void createuserandgroup() {
identityservice identityservice = this.processengine.getidentityservice();
//保存到act_id_group
groupentity group = new groupentity("1");
group.setname("部门经理");
identityservice.savegroup(group);
groupentity group2 = new groupentity("2");
group2.setname("总经理");
identityservice.savegroup(group2);
//保存到act_id_user
userentity user1 = new userentity("1");
user1.setfirstname("小明");
user1.setemail("11111@aa.com");
identityservice.saveuser(user1);
userentity user2 = new userentity("2");
user2.setfirstname("小张");
identityservice.saveuser(user2);
userentity user3 = new userentity("3");
user3.setfirstname("小王");
identityservice.saveuser(user3);
//建立用户和用户组的关系act_id_membership
identityservice.createmembership("1", "1");
identityservice.createmembership("2", "1");
identityservice.createmembership("3", "2");
system.out.println("保存完成");
}
二、总结
上一篇: 定军山战役,在三国历史上有什么意义?
下一篇: Java电子书高清PDF集合免费下载