activiti学习--14:用户角色组
来源:互联网 发布:js图片无缝滚动代码 编辑:程序博客网 时间:2024/06/15 23:40
用户角色组
1可以把角色组里面的用户,当做组任务的代理人集合
task.bpmn
<?xml version="1.0" encoding="UTF-8"?><definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test"> <process id="*task*" name="taskProcess" isExecutable="true"> <startEvent id="startevent1" name="Start"></startEvent> <userTask id="usertask1" name="审批" activiti:candidateGroups="部门经理"></userTask> <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow> <endEvent id="endevent1" name="End"></endEvent> <sequenceFlow id="flow2" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow> </process> <bpmndi:BPMNDiagram id="BPMNDiagram_task"> <bpmndi:BPMNPlane bpmnElement="task" id="BPMNPlane_task"> <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1"> <omgdc:Bounds height="35.0" width="35.0" x="390.0" y="50.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1"> <omgdc:Bounds height="55.0" width="105.0" x="355.0" y="150.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1"> <omgdc:Bounds height="35.0" width="35.0" x="390.0" y="270.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> <omgdi:waypoint x="407.0" y="85.0"></omgdi:waypoint> <omgdi:waypoint x="407.0" y="150.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> <omgdi:waypoint x="407.0" y="205.0"></omgdi:waypoint> <omgdi:waypoint x="407.0" y="270.0"></omgdi:waypoint> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram></definitions>
代码
/**部署流程定义(从inputStream)*/ @Test public void deploymentProcessDefinition_inputStream(){ InputStream inputStreamBpmn = this.getClass().getResourceAsStream("task.bpmn"); InputStream inputStreamPng = this.getClass().getResourceAsStream("task.png"); Deployment deployment = processEngine.getRepositoryService()//与流程定义和部署对象相关的Service .createDeployment()//创建一个部署对象 .name("任务")//添加部署的名称 .addInputStream("task.bpmn", inputStreamBpmn)// .addInputStream("task.png", inputStreamPng)// .deploy();//完成部署 System.out.println("部署ID:"+deployment.getId());// System.out.println("部署名称:"+deployment.getName());// /**添加用户角色组*/ IdentityService identityService = processEngine.getIdentityService();// //创建角色 identityService.saveGroup(new GroupEntity("财务经理")); identityService.saveGroup(new GroupEntity("部门经理")); //创建用户 identityService.saveUser(new UserEntity("陈肖村")); identityService.saveUser(new UserEntity("黄金龙")); identityService.saveUser(new UserEntity("刘亚飞")); //建立用户和角色的关联关系 identityService.createMembership("陈肖村", "部门经理"); identityService.createMembership("黄金龙", "部门经理"); identityService.createMembership("刘亚飞", "财务经理"); System.out.println("添加组织机构成功");// 输出:// 部署ID:6101// 部署名称:任务// 添加组织机构成功
影响的表
ACT_HI_IDENTITYLINK
ACT_RU_IDENTITYLINK
阅读全文
0 0
- activiti学习--14:用户角色组
- Activiti 学习笔记14:工作流定义的角色组
- activiti用户角色权限与自身系统用户角色同步
- Activiti学习之用户与组
- activiti 自定义用户、组
- Oracle学习 用户、权限、角色
- 框架 day57 BOS项目练习(流程定义/实例管理,bos用户角色同步activiti用户表组表)
- BOS项目练习(流程定义/实例管理,bos用户角色同步activiti用户表组表)
- activiti学习笔记3-用户与用户组
- jeesite用户、组与activiti用户、组
- activiti用户
- 组任务(group)activiti工作流的角色
- 15.activiti工作流-工作流定义的角色组(了解)
- 用户-角色-权限-组设计
- Activiti工作流进阶(十二)————工作流提供的用户角色
- 6.【SELinux学习笔记】角色和用户
- ORACLE 的用户与角色学习笔记
- Activiti 自定义用户管理和组管理
- Anaconda是什么?
- ***
- centos7/redhat7更改网卡名称为eth0
- Mac开发必备工具(三)—— Fish shell
- 【PAT】【Advanced Level】1101. Quick Sort (25)
- activiti学习--14:用户角色组
- STM32f103zet6,综合大实验。
- zip函数的使用
- Android---多线程
- Laravel 引入第三方类库及自定义函数
- poj2096 Collecting Bugs
- 我的博客即将入驻“云栖社区”,诚邀技术同仁一同入驻。
- 开博了
- oracle去重