Commit 310591ce36bd426b9db458b227aa3db754ee6fbb

Authored by cuicui
1 parent e9586573

flowable-单元测试-service无法实例化

Showing 23 changed files with 1130 additions and 0 deletions
yudao-module-bpm/yudao-module-bpm-impl-flowable/pom.xml
@@ -35,6 +35,19 @@ @@ -35,6 +35,19 @@
35 <artifactId>yudao-spring-boot-starter-test</artifactId> 35 <artifactId>yudao-spring-boot-starter-test</artifactId>
36 <scope>test</scope> 36 <scope>test</scope>
37 </dependency> 37 </dependency>
  38 + <!--junit4-->
  39 + <dependency>
  40 + <groupId>junit</groupId>
  41 + <artifactId>junit</artifactId>
  42 + <version>4.11</version>
  43 + <scope>test</scope>
  44 + </dependency>
  45 + <dependency>
  46 + <groupId>com.h2database</groupId>
  47 + <artifactId>h2</artifactId>
  48 + <version>1.4.196</version>
  49 + <scope>test</scope>
  50 + </dependency>
38 </dependencies> 51 </dependencies>
39 52
40 </project> 53 </project>
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/java/cn/iocoder/yudao/module/bpm/AbstractOATest.java 0 → 100644
  1 +package cn.iocoder.yudao.module.bpm;
  2 +
  3 +import org.flowable.engine.*;
  4 +import org.flowable.engine.test.FlowableRule;
  5 +import org.junit.AfterClass;
  6 +import org.junit.Before;
  7 +import org.junit.BeforeClass;
  8 +import org.junit.Rule;
  9 +
  10 +/**
  11 + * 抽象测试基类
  12 + *
  13 + * @author henryyan cuicui
  14 + */
  15 +public abstract class AbstractOATest {
  16 +
  17 + /**
  18 + * 专门用于测试套件
  19 + */
  20 + @Rule
  21 + public FlowableRule activitiRule = new FlowableRule("flowable.cfg.xml");
  22 +
  23 + protected ProcessEngine processEngine;
  24 + protected RepositoryService repositoryService;
  25 + protected RuntimeService runtimeService;
  26 + protected TaskService taskService;
  27 + protected HistoryService historyService;
  28 + protected IdentityService identityService;
  29 + protected ManagementService managementService;
  30 + protected FormService formService;
  31 +
  32 + /**
  33 + * 开始测试
  34 + */
  35 + @BeforeClass
  36 + public static void setUpForClass() throws Exception {
  37 + System.out.println("++++++++ 开始测试 ++++++++");
  38 + }
  39 +
  40 + /**
  41 + * 结束测试
  42 + */
  43 + @AfterClass
  44 + public static void testOverForClass() throws Exception {
  45 + System.out.println("-------- 结束测试 --------");
  46 + }
  47 +
  48 + /**
  49 + * 初始化变量
  50 + */
  51 + @Before
  52 + public void setUp() throws Exception {
  53 + processEngine = activitiRule.getProcessEngine();
  54 + repositoryService = activitiRule.getRepositoryService();
  55 + runtimeService = activitiRule.getRuntimeService();
  56 + taskService = activitiRule.getTaskService();
  57 + historyService = activitiRule.getHistoryService();
  58 + identityService = activitiRule.getIdentityService();
  59 + managementService = activitiRule.getManagementService();
  60 + formService = activitiRule.getFormService();
  61 + }
  62 +
  63 +}
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/java/cn/iocoder/yudao/module/bpm/ConditionTest.java 0 → 100644
  1 +package cn.iocoder.yudao.module.bpm;
  2 +
  3 +import org.flowable.engine.history.HistoricDetail;
  4 +import org.flowable.engine.history.HistoricFormProperty;
  5 +import org.flowable.engine.history.HistoricProcessInstance;
  6 +import org.flowable.engine.history.HistoricVariableUpdate;
  7 +import org.flowable.engine.repository.ProcessDefinition;
  8 +import org.flowable.engine.runtime.ProcessInstance;
  9 +import org.flowable.engine.test.Deployment;
  10 +import org.flowable.task.api.Task;
  11 +import org.joda.time.DateTime;
  12 +import org.junit.Test;
  13 +
  14 +import java.text.SimpleDateFormat;
  15 +import java.util.*;
  16 +
  17 +import static org.junit.Assert.assertEquals;
  18 +import static org.junit.Assert.assertNotNull;
  19 +
  20 +/**
  21 + * 条件测试
  22 + * 1 某个节点-支付额度需要大于70%
  23 + * 2 支付条件完成后,开始倒计时15天,要完成流程处理
  24 + * @author cuicui
  25 + */
  26 +public class ConditionTest extends AbstractOATest {
  27 +
  28 + @Test
  29 + @Deployment(resources = {"chapter6/leave-timeLimit-money/leave-formkey-ext.bpmn", "chapter6/leave-timeLimit-money/leave-start.form",
  30 + "chapter6/leave-timeLimit-money/approve-deptLeader.form", "chapter6/leave-timeLimit-money/approve-hr.form", "chapter6/leave-timeLimit-money/report-back.form",
  31 + "chapter6/leave-timeLimit-money/modify-apply.form"})
  32 + public void allPass() throws Exception {
  33 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  34 + Map<String, String> variables = new HashMap<String, String>();
  35 + Calendar ca = Calendar.getInstance();
  36 + String startDate = sdf.format(ca.getTime());
  37 + ca.add(Calendar.DAY_OF_MONTH, 2); // 当前日期加2天
  38 + String endDate = sdf.format(ca.getTime());
  39 +
  40 + // 启动流程
  41 + variables.put("startDate", startDate);
  42 + variables.put("endDate", endDate);
  43 + variables.put("reason", "公休");
  44 +
  45 + ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();
  46 +
  47 + // 读取启动表单
  48 + Object renderedStartForm = formService.getRenderedStartForm(processDefinition.getId());
  49 + assertNotNull(renderedStartForm);
  50 +
  51 + // 启动流程
  52 + // 设置当前用户
  53 + String currentUserId = "henryyan";
  54 + identityService.setAuthenticatedUserId(currentUserId);
  55 + ProcessInstance processInstance = formService.submitStartFormData(processDefinition.getId(), variables);
  56 + assertNotNull(processInstance);
  57 +
  58 + // 部门领导审批通过
  59 + Task deptLeaderTask = taskService.createTaskQuery().taskCandidateGroup("deptLeader").singleResult();
  60 + assertNotNull(formService.getRenderedTaskForm(deptLeaderTask.getId()));
  61 + variables = new HashMap<String, String>();
  62 + variables.put("deptLeaderApproved", "true");
  63 + formService.submitTaskFormData(deptLeaderTask.getId(), variables);
  64 +
  65 + // 人事审批通过
  66 + Task hrTask = taskService.createTaskQuery().taskCandidateGroup("hr").singleResult();
  67 + assertNotNull(formService.getRenderedTaskForm(hrTask.getId()));
  68 + variables = new HashMap<String, String>();
  69 + variables.put("hrApproved", "true");
  70 + //手动设置支付金额
  71 + variables.put("amountMoney", "19999");
  72 + formService.submitTaskFormData(hrTask.getId(), variables);
  73 + //判断支付金额是否>1万元
  74 + // 财务打款通过
  75 + Task caiwuTask = taskService.createTaskQuery().taskCandidateGroup("caiwu").singleResult();
  76 + printTask(caiwuTask);
  77 + taskService.complete(caiwuTask.getId());
  78 + //判断倒计时15天
  79 + Task chuNaTask = taskService.createTaskQuery().taskCandidateGroup("chuNa").singleResult();
  80 + printTask(chuNaTask);
  81 + taskService.complete(chuNaTask.getId());
  82 +
  83 + // 销假(根据申请人的用户ID读取)
  84 +// Task reportBackTask = taskService.createTaskQuery().taskAssignee(currentUserId).singleResult();
  85 +// assertNotNull(formService.getRenderedTaskForm(reportBackTask.getId()));
  86 +// variables = new HashMap<String, String>();
  87 +// variables.put("reportBackDate", sdf.format(ca.getTime()));
  88 +// formService.submitTaskFormData(reportBackTask.getId(), variables);
  89 +
  90 + // 验证流程是否已经结束
  91 + HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery().finished().singleResult();
  92 + assertNotNull(historicProcessInstance);
  93 +
  94 + // 读取历史变量
  95 + Map<String, Object> historyVariables = packageVariables(processInstance);
  96 +
  97 + // 验证执行结果
  98 + assertEquals("ok", historyVariables.get("result"));
  99 +
  100 + }
  101 +
  102 + /**
  103 + * 查询过期任务
  104 + * @throws Exception
  105 + */
  106 + @Test
  107 + @Deployment(resources = {"chapter6/leave-timeLimit-money/leave-formkey-ext.bpmn", "chapter6/leave-timeLimit-money/leave-start.form",
  108 + "chapter6/leave-timeLimit-money/approve-deptLeader.form", "chapter6/leave-timeLimit-money/approve-hr.form", "chapter6/leave-timeLimit-money/report-back.form",
  109 + "chapter6/leave-timeLimit-money/modify-apply.form"})
  110 + public void dueDate() throws Exception {
  111 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  112 + Map<String, String> variables = new HashMap<String, String>();
  113 + Calendar ca = Calendar.getInstance();
  114 + String startDate = sdf.format(ca.getTime());
  115 + ca.add(Calendar.DAY_OF_MONTH, 2); // 当前日期加2天
  116 + String endDate = sdf.format(ca.getTime());
  117 +
  118 + // 启动流程
  119 + variables.put("startDate", startDate);
  120 + variables.put("endDate", endDate);
  121 + variables.put("reason", "公休");
  122 +
  123 + ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().singleResult();
  124 +
  125 + // 读取启动表单
  126 + Object renderedStartForm = formService.getRenderedStartForm(processDefinition.getId());
  127 + assertNotNull(renderedStartForm);
  128 +
  129 + // 启动流程
  130 + // 设置当前用户
  131 + String currentUserId = "henryyan";
  132 + identityService.setAuthenticatedUserId(currentUserId);
  133 + ProcessInstance processInstance = formService.submitStartFormData(processDefinition.getId(), variables);
  134 + assertNotNull(processInstance);
  135 +
  136 + // 部门领导审批通过
  137 + Task deptLeaderTask = taskService.createTaskQuery().taskCandidateGroup("deptLeader").singleResult();
  138 + assertNotNull(formService.getRenderedTaskForm(deptLeaderTask.getId()));
  139 + variables = new HashMap<String, String>();
  140 + variables.put("deptLeaderApproved", "true");
  141 + formService.submitTaskFormData(deptLeaderTask.getId(), variables);
  142 +
  143 + // 人事审批通过
  144 + Task hrTask = taskService.createTaskQuery().taskCandidateGroup("hr").singleResult();
  145 + assertNotNull(formService.getRenderedTaskForm(hrTask.getId()));
  146 + variables = new HashMap<String, String>();
  147 + variables.put("hrApproved", "true");
  148 + //手动设置支付金额
  149 + variables.put("amountMoney", "19999");
  150 + formService.submitTaskFormData(hrTask.getId(), variables);
  151 + //判断支付金额是否>1万元
  152 + // 财务打款通过
  153 + Task caiwuTask = taskService.createTaskQuery().taskCandidateGroup("caiwu").singleResult();
  154 + printTask(caiwuTask);
  155 +
  156 + //设置5天前就过期了
  157 + DateTime dateTime = DateTime.now();
  158 + DateTime minusDays = dateTime.minusDays(5);
  159 + taskService.setDueDate(caiwuTask.getId(),minusDays.toDate());
  160 + //查询今天以前的过期任务
  161 + List<Task> listTask = taskService.createTaskQuery().taskDueBefore(new Date()).list();
  162 + for (Task task : listTask) {
  163 + printTask(task);
  164 + }
  165 +
  166 + // 销假(根据申请人的用户ID读取)
  167 +// Task reportBackTask = taskService.createTaskQuery().taskAssignee(currentUserId).singleResult();
  168 +// assertNotNull(formService.getRenderedTaskForm(reportBackTask.getId()));
  169 +// variables = new HashMap<String, String>();
  170 +// variables.put("reportBackDate", sdf.format(ca.getTime()));
  171 +// formService.submitTaskFormData(reportBackTask.getId(), variables);
  172 +
  173 + // 验证流程是否已经结束
  174 + HistoricProcessInstance historicProcessInstance = historyService.createHistoricProcessInstanceQuery().finished().singleResult();
  175 + assertNotNull(historicProcessInstance);
  176 +
  177 + // 读取历史变量
  178 + Map<String, Object> historyVariables = packageVariables(processInstance);
  179 +
  180 + // 验证执行结果
  181 + assertEquals("ok", historyVariables.get("result"));
  182 +
  183 + }
  184 +
  185 + /**
  186 + * 任意流程的跳转
  187 + */
  188 + @Test
  189 + public void taskJump(){
  190 + // 当前任务
  191 + String taskId="ddd";
  192 + Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
  193 + String assignee = "下一个自由跳转人";
  194 + taskService.setAssignee(taskId,assignee);
  195 + // 自由跳转
  196 + String taskDefKey="目标-任务名称";
  197 + //moveActivityIdTo的两个参数,源任务key,目标任务key
  198 + runtimeService.createChangeActivityStateBuilder().processInstanceId(task.getProcessInstanceId()).moveActivityIdTo(task.getTaskDefinitionKey(), taskDefKey).changeState();
  199 +
  200 + }
  201 +
  202 +
  203 + /**
  204 + * 读取历史变量并封装到Map中
  205 + */
  206 + private Map<String, Object> packageVariables(ProcessInstance processInstance) {
  207 + Map<String, Object> historyVariables = new HashMap<String, Object>();
  208 + List<HistoricDetail> list = historyService.createHistoricDetailQuery().processInstanceId(processInstance.getId()).list();
  209 + for (HistoricDetail historicDetail : list) {
  210 + if (historicDetail instanceof HistoricFormProperty) {
  211 + // 表单中的字段
  212 + HistoricFormProperty field = (HistoricFormProperty) historicDetail;
  213 + historyVariables.put(field.getPropertyId(), field.getPropertyValue());
  214 + System.out.println("form field: taskId=" + field.getTaskId() + ", " + field.getPropertyId() + " = " + field.getPropertyValue());
  215 + } else if (historicDetail instanceof HistoricVariableUpdate) {
  216 + HistoricVariableUpdate variable = (HistoricVariableUpdate) historicDetail;
  217 + historyVariables.put(variable.getVariableName(), variable.getValue());
  218 + System.out.println("variable: " + variable.getVariableName() + " = " + variable.getValue());
  219 + }
  220 + }
  221 + return historyVariables;
  222 + }
  223 + private void printTask(Task task){
  224 + System.out.println(task.getName()+" : " + task.getDueDate());
  225 + }
  226 +}
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/dynamic-form/leave-dynamic-form-with-javascript.zip 0 → 100644
No preview for this file type
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/dynamic-form/leave-dynamic-form.zip 0 → 100644
No preview for this file type
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/dynamic-form/leave.bpmn 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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.kafeitu.me/activiti/leave">
  3 + <process id="leave" name="请假流程-动态表单" isExecutable="true">
  4 + <documentation>请假流程演示-动态表单</documentation>
  5 + <startEvent id="startevent1" name="Start" activiti:initiator="applyUserId">
  6 + <extensionElements>
  7 + <activiti:formProperty id="startDate" name="请假开始日期" type="date" datePattern="yyyy-MM-dd" required="true"></activiti:formProperty>
  8 + <activiti:formProperty id="endDate" name="请假结束日期" type="date" datePattern="yyyy-MM-dd" required="true"></activiti:formProperty>
  9 + <activiti:formProperty id="reason" name="请假原因" type="string" required="true"></activiti:formProperty>
  10 + <activiti:formProperty id="validScript" type="javascript" default="alert('表单已经加载完毕');"></activiti:formProperty>
  11 + </extensionElements>
  12 + </startEvent>
  13 + <userTask id="deptLeaderAudit" name="部门领导审批" activiti:candidateGroups="deptLeader">
  14 + <extensionElements>
  15 + <activiti:formProperty id="startDate" name="请假开始日期" type="date" datePattern="yyyy-MM-dd" writable="false"></activiti:formProperty>
  16 + <activiti:formProperty id="endDate" name="请假结束日期" type="date" datePattern="yyyy-MM-dd" writable="false"></activiti:formProperty>
  17 + <activiti:formProperty id="reason" name="请假原因" type="string" writable="false"></activiti:formProperty>
  18 + <activiti:formProperty id="deptLeaderApproved" name="审批意见" type="enum" required="true">
  19 + <activiti:value id="true" name="同意"></activiti:value>
  20 + <activiti:value id="false" name="拒绝"></activiti:value>
  21 + </activiti:formProperty>
  22 + </extensionElements>
  23 + </userTask>
  24 + <exclusiveGateway id="exclusivegateway5" name="Exclusive Gateway"></exclusiveGateway>
  25 + <userTask id="modifyApply" name="调整申请" activiti:assignee="${applyUserId}">
  26 + <extensionElements>
  27 + <activiti:formProperty id="startDate" name="请假开始日期" type="date" datePattern="yyyy-MM-dd" required="true"></activiti:formProperty>
  28 + <activiti:formProperty id="endDate" name="请假结束日期" type="date" datePattern="yyyy-MM-dd" required="true"></activiti:formProperty>
  29 + <activiti:formProperty id="reason" name="请假原因" type="string" required="true"></activiti:formProperty>
  30 + <activiti:formProperty id="reApply" name="重新申请" type="enum" required="true">
  31 + <activiti:value id="true" name="重新申请"></activiti:value>
  32 + <activiti:value id="false" name="取消申请"></activiti:value>
  33 + </activiti:formProperty>
  34 + </extensionElements>
  35 + </userTask>
  36 + <userTask id="hrAudit" name="人事审批" activiti:candidateGroups="hr">
  37 + <extensionElements>
  38 + <activiti:formProperty id="startDate" name="请假开始日期" type="date" datePattern="yyyy-MM-dd" writable="false"></activiti:formProperty>
  39 + <activiti:formProperty id="endDate" name="请假结束日期" type="date" datePattern="yyyy-MM-dd" writable="false"></activiti:formProperty>
  40 + <activiti:formProperty id="reason" name="请假原因" type="string" writable="false"></activiti:formProperty>
  41 + <activiti:formProperty id="hrApproved" name="审批意见" type="enum" required="true">
  42 + <activiti:value id="true" name="同意"></activiti:value>
  43 + <activiti:value id="false" name="拒绝"></activiti:value>
  44 + </activiti:formProperty>
  45 + </extensionElements>
  46 + </userTask>
  47 + <exclusiveGateway id="exclusivegateway6" name="Exclusive Gateway"></exclusiveGateway>
  48 + <userTask id="reportBack" name="销假" activiti:assignee="${applyUserId}">
  49 + <extensionElements>
  50 + <activiti:formProperty id="startDate" name="请假开始日期" type="date" datePattern="yyyy-MM-dd" writable="false"></activiti:formProperty>
  51 + <activiti:formProperty id="endDate" name="请假结束日期" type="date" datePattern="yyyy-MM-dd" writable="false"></activiti:formProperty>
  52 + <activiti:formProperty id="reason" name="请假原因" type="string" writable="false"></activiti:formProperty>
  53 + <activiti:formProperty id="reportBackDate" name="销假日期" type="date" default="${endDate}" datePattern="yyyy-MM-dd" required="true"></activiti:formProperty>
  54 + </extensionElements>
  55 + </userTask>
  56 + <endEvent id="endevent1" name="End"></endEvent>
  57 + <exclusiveGateway id="exclusivegateway7" name="Exclusive Gateway"></exclusiveGateway>
  58 + <sequenceFlow id="flow2" sourceRef="startevent1" targetRef="deptLeaderAudit"></sequenceFlow>
  59 + <sequenceFlow id="flow3" sourceRef="deptLeaderAudit" targetRef="exclusivegateway5"></sequenceFlow>
  60 + <sequenceFlow id="flow4" name="拒绝" sourceRef="exclusivegateway5" targetRef="modifyApply">
  61 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${deptLeaderApproved == 'false'}]]></conditionExpression>
  62 + </sequenceFlow>
  63 + <sequenceFlow id="flow5" name="同意" sourceRef="exclusivegateway5" targetRef="hrAudit">
  64 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${deptLeaderApproved == 'true'}]]></conditionExpression>
  65 + </sequenceFlow>
  66 + <sequenceFlow id="flow6" sourceRef="hrAudit" targetRef="exclusivegateway6"></sequenceFlow>
  67 + <sequenceFlow id="flow7" name="同意" sourceRef="exclusivegateway6" targetRef="reportBack">
  68 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${hrApproved == 'true'}]]></conditionExpression>
  69 + </sequenceFlow>
  70 + <sequenceFlow id="flow8" name="销假" sourceRef="reportBack" targetRef="endevent1">
  71 + <extensionElements>
  72 + <activiti:executionListener event="take" expression="${execution.setVariable('result', 'ok')}"></activiti:executionListener>
  73 + </extensionElements>
  74 + </sequenceFlow>
  75 + <sequenceFlow id="flow9" name="拒绝" sourceRef="exclusivegateway6" targetRef="modifyApply">
  76 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${hrApproved == 'false'}]]></conditionExpression>
  77 + </sequenceFlow>
  78 + <sequenceFlow id="flow10" name="重新申请" sourceRef="exclusivegateway7" targetRef="deptLeaderAudit">
  79 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${reApply == 'true'}]]></conditionExpression>
  80 + </sequenceFlow>
  81 + <sequenceFlow id="flow11" sourceRef="modifyApply" targetRef="exclusivegateway7"></sequenceFlow>
  82 + <sequenceFlow id="flow12" name="结束流程" sourceRef="exclusivegateway7" targetRef="endevent1">
  83 + <extensionElements>
  84 + <activiti:executionListener event="take" expression="${execution.setVariable('result', 'canceled')}"></activiti:executionListener>
  85 + </extensionElements>
  86 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${reApply == 'false'}]]></conditionExpression>
  87 + </sequenceFlow>
  88 + <textAnnotation id="textannotation1" textFormat="text/plain">
  89 + <text>请求被驳回后员工可以选择继续申请,或者取消本次申请</text>
  90 + </textAnnotation>
  91 + <association id="association1" sourceRef="modifyApply" targetRef="textannotation1"></association>
  92 + </process>
  93 + <bpmndi:BPMNDiagram id="BPMNDiagram_leave">
  94 + <bpmndi:BPMNPlane bpmnElement="leave" id="BPMNPlane_leave">
  95 + <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
  96 + <omgdc:Bounds height="35.0" width="35.0" x="10.0" y="30.0"></omgdc:Bounds>
  97 + </bpmndi:BPMNShape>
  98 + <bpmndi:BPMNShape bpmnElement="deptLeaderAudit" id="BPMNShape_deptLeaderAudit">
  99 + <omgdc:Bounds height="55.0" width="105.0" x="90.0" y="20.0"></omgdc:Bounds>
  100 + </bpmndi:BPMNShape>
  101 + <bpmndi:BPMNShape bpmnElement="exclusivegateway5" id="BPMNShape_exclusivegateway5">
  102 + <omgdc:Bounds height="40.0" width="40.0" x="250.0" y="27.0"></omgdc:Bounds>
  103 + </bpmndi:BPMNShape>
  104 + <bpmndi:BPMNShape bpmnElement="modifyApply" id="BPMNShape_modifyApply">
  105 + <omgdc:Bounds height="55.0" width="105.0" x="218.0" y="108.0"></omgdc:Bounds>
  106 + </bpmndi:BPMNShape>
  107 + <bpmndi:BPMNShape bpmnElement="hrAudit" id="BPMNShape_hrAudit">
  108 + <omgdc:Bounds height="55.0" width="105.0" x="358.0" y="20.0"></omgdc:Bounds>
  109 + </bpmndi:BPMNShape>
  110 + <bpmndi:BPMNShape bpmnElement="exclusivegateway6" id="BPMNShape_exclusivegateway6">
  111 + <omgdc:Bounds height="40.0" width="40.0" x="495.0" y="27.0"></omgdc:Bounds>
  112 + </bpmndi:BPMNShape>
  113 + <bpmndi:BPMNShape bpmnElement="reportBack" id="BPMNShape_reportBack">
  114 + <omgdc:Bounds height="55.0" width="105.0" x="590.0" y="20.0"></omgdc:Bounds>
  115 + </bpmndi:BPMNShape>
  116 + <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
  117 + <omgdc:Bounds height="35.0" width="35.0" x="625.0" y="223.0"></omgdc:Bounds>
  118 + </bpmndi:BPMNShape>
  119 + <bpmndi:BPMNShape bpmnElement="exclusivegateway7" id="BPMNShape_exclusivegateway7">
  120 + <omgdc:Bounds height="40.0" width="40.0" x="250.0" y="220.0"></omgdc:Bounds>
  121 + </bpmndi:BPMNShape>
  122 + <bpmndi:BPMNShape bpmnElement="textannotation1" id="BPMNShape_textannotation1">
  123 + <omgdc:Bounds height="57.0" width="120.0" x="361.0" y="174.0"></omgdc:Bounds>
  124 + </bpmndi:BPMNShape>
  125 + <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
  126 + <omgdi:waypoint x="45.0" y="47.0"></omgdi:waypoint>
  127 + <omgdi:waypoint x="90.0" y="47.0"></omgdi:waypoint>
  128 + </bpmndi:BPMNEdge>
  129 + <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
  130 + <omgdi:waypoint x="195.0" y="47.0"></omgdi:waypoint>
  131 + <omgdi:waypoint x="250.0" y="47.0"></omgdi:waypoint>
  132 + </bpmndi:BPMNEdge>
  133 + <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
  134 + <omgdi:waypoint x="270.0" y="67.0"></omgdi:waypoint>
  135 + <omgdi:waypoint x="270.0" y="108.0"></omgdi:waypoint>
  136 + <bpmndi:BPMNLabel>
  137 + <omgdc:Bounds height="11.0" width="22.0" x="280.0" y="67.0"></omgdc:Bounds>
  138 + </bpmndi:BPMNLabel>
  139 + </bpmndi:BPMNEdge>
  140 + <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
  141 + <omgdi:waypoint x="290.0" y="47.0"></omgdi:waypoint>
  142 + <omgdi:waypoint x="358.0" y="47.0"></omgdi:waypoint>
  143 + <bpmndi:BPMNLabel>
  144 + <omgdc:Bounds height="11.0" width="22.0" x="300.0" y="30.0"></omgdc:Bounds>
  145 + </bpmndi:BPMNLabel>
  146 + </bpmndi:BPMNEdge>
  147 + <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
  148 + <omgdi:waypoint x="463.0" y="47.0"></omgdi:waypoint>
  149 + <omgdi:waypoint x="495.0" y="47.0"></omgdi:waypoint>
  150 + </bpmndi:BPMNEdge>
  151 + <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
  152 + <omgdi:waypoint x="535.0" y="47.0"></omgdi:waypoint>
  153 + <omgdi:waypoint x="590.0" y="47.0"></omgdi:waypoint>
  154 + <bpmndi:BPMNLabel>
  155 + <omgdc:Bounds height="11.0" width="22.0" x="544.0" y="30.0"></omgdc:Bounds>
  156 + </bpmndi:BPMNLabel>
  157 + </bpmndi:BPMNEdge>
  158 + <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
  159 + <omgdi:waypoint x="642.0" y="75.0"></omgdi:waypoint>
  160 + <omgdi:waypoint x="642.0" y="223.0"></omgdi:waypoint>
  161 + <bpmndi:BPMNLabel>
  162 + <omgdc:Bounds height="11.0" width="22.0" x="652.0" y="75.0"></omgdc:Bounds>
  163 + </bpmndi:BPMNLabel>
  164 + </bpmndi:BPMNEdge>
  165 + <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
  166 + <omgdi:waypoint x="515.0" y="67.0"></omgdi:waypoint>
  167 + <omgdi:waypoint x="514.0" y="135.0"></omgdi:waypoint>
  168 + <omgdi:waypoint x="323.0" y="135.0"></omgdi:waypoint>
  169 + <bpmndi:BPMNLabel>
  170 + <omgdc:Bounds height="11.0" width="22.0" x="525.0" y="67.0"></omgdc:Bounds>
  171 + </bpmndi:BPMNLabel>
  172 + </bpmndi:BPMNEdge>
  173 + <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
  174 + <omgdi:waypoint x="250.0" y="240.0"></omgdi:waypoint>
  175 + <omgdi:waypoint x="142.0" y="239.0"></omgdi:waypoint>
  176 + <omgdi:waypoint x="142.0" y="75.0"></omgdi:waypoint>
  177 + <bpmndi:BPMNLabel>
  178 + <omgdc:Bounds height="11.0" width="44.0" x="152.0" y="221.0"></omgdc:Bounds>
  179 + </bpmndi:BPMNLabel>
  180 + </bpmndi:BPMNEdge>
  181 + <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
  182 + <omgdi:waypoint x="270.0" y="163.0"></omgdi:waypoint>
  183 + <omgdi:waypoint x="270.0" y="220.0"></omgdi:waypoint>
  184 + </bpmndi:BPMNEdge>
  185 + <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
  186 + <omgdi:waypoint x="290.0" y="240.0"></omgdi:waypoint>
  187 + <omgdi:waypoint x="625.0" y="240.0"></omgdi:waypoint>
  188 + <bpmndi:BPMNLabel>
  189 + <omgdc:Bounds height="11.0" width="44.0" x="429.0" y="247.0"></omgdc:Bounds>
  190 + </bpmndi:BPMNLabel>
  191 + </bpmndi:BPMNEdge>
  192 + <bpmndi:BPMNEdge bpmnElement="association1" id="BPMNEdge_association1">
  193 + <omgdi:waypoint x="323.0" y="135.0"></omgdi:waypoint>
  194 + <omgdi:waypoint x="421.0" y="174.0"></omgdi:waypoint>
  195 + </bpmndi:BPMNEdge>
  196 + </bpmndi:BPMNPlane>
  197 + </bpmndi:BPMNDiagram>
  198 +</definitions>
0 \ No newline at end of file 199 \ No newline at end of file
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/dynamic-form/leave.png 0 → 100644

27.6 KB

yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/leave-formkey/approve-deptLeader.form 0 → 100644
  1 +<div class="control-group">
  2 + <label class="control-label" for="startDate">申请人:</label>
  3 + <div class="controls">${applyUserId}</div>
  4 +</div>
  5 +<div class="control-group">
  6 + <label class="control-label" for="startDate">开始时间:</label>
  7 + <div class="controls">
  8 + <input type="text" id="startDate" name="startDate" value="${startDate}" readonly />
  9 + </div>
  10 +</div>
  11 +<div class="control-group">
  12 + <label class="control-label" for="endDate">结束时间:</label>
  13 + <div class="controls">
  14 + <input type="text" id="endDate" name="endDate" value="${endDate}" readonly />
  15 + </div>
  16 +</div>
  17 +<div class="control-group">
  18 + <label class="control-label" for="reason">请假原因:</label>
  19 + <div class="controls">
  20 + <textarea id="reason" name="reason" readonly>${reason}</textarea>
  21 + </div>
  22 +</div>
  23 +<div class="control-group">
  24 + <label class="control-label" for="deptLeaderApproved">审批意见:</label>
  25 + <div class="controls">
  26 + <select name="deptLeaderApproved" id="deptLeaderApproved">
  27 + <option value="true">同意</option>
  28 + <option value="false">拒绝</option>
  29 + </select>
  30 + </div>
  31 +</div>
0 \ No newline at end of file 32 \ No newline at end of file
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/leave-formkey/approve-hr.form 0 → 100644
  1 +<div class="control-group">
  2 + <label class="control-label" for="startDate">申请人:</label>
  3 + <div class="controls">${applyUserId}</div>
  4 +</div>
  5 +<div class="control-group">
  6 + <label class="control-label" for="startDate">开始时间:</label>
  7 + <div class="controls">
  8 + <input type="text" id="startDate" name="startDate" value="${startDate}" readonly />
  9 + </div>
  10 +</div>
  11 +<div class="control-group">
  12 + <label class="control-label" for="endDate">结束时间:</label>
  13 + <div class="controls">
  14 + <input type="text" id="endDate" name="endDate" value="${endDate}" readonly />
  15 + </div>
  16 +</div>
  17 +<div class="control-group">
  18 + <label class="control-label" for="reason">请假原因:</label>
  19 + <div class="controls">
  20 + <textarea id="reason" name="reason" readonly>${reason}</textarea>
  21 + </div>
  22 +</div>
  23 +<div class="control-group">
  24 + <label class="control-label" for="hrApproved">审批意见:</label>
  25 + <div class="controls">
  26 + <select name="hrApproved" id="hrApproved">
  27 + <option value="true">同意</option>
  28 + <option value="false">拒绝</option>
  29 + </select>
  30 + </div>
  31 +</div>
0 \ No newline at end of file 32 \ No newline at end of file
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/leave-formkey/leave-formkey.bpmn 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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.kafeitu.me/activiti">
  3 + <process id="leave-formkey" name="请假流程-外置表单" isExecutable="true">
  4 + <documentation>《Activiti实战》第6章的例子--外置表单</documentation>
  5 + <startEvent id="startevent1" name="Start" activiti:initiator="applyUserId" activiti:formKey="chapter6/leave-formkey/leave-start.form"></startEvent>
  6 + <userTask id="deptLeaderVerify" name="部门经理审批" activiti:candidateGroups="deptLeader" activiti:formKey="chapter6/leave-formkey/approve-deptLeader.form"></userTask>
  7 + <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
  8 + <userTask id="hrVerify" name="人事经理审批" activiti:candidateGroups="hr" activiti:formKey="chapter6/leave-formkey/approve-hr.form"></userTask>
  9 + <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
  10 + <userTask id="reportBack" name="销假" activiti:assignee="${applyUserId}" activiti:formKey="chapter6/leave-formkey/report-back.form"></userTask>
  11 + <endEvent id="endevent1" name="End"></endEvent>
  12 + <userTask id="modifyApply" name="调整申请内容" activiti:assignee="${applyUserId}" activiti:formKey="chapter6/leave-formkey/modify-apply.form"></userTask>
  13 + <exclusiveGateway id="exclusivegateway3" name="Exclusive Gateway"></exclusiveGateway>
  14 + <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="deptLeaderVerify"></sequenceFlow>
  15 + <sequenceFlow id="flow2" sourceRef="deptLeaderVerify" targetRef="exclusivegateway1"></sequenceFlow>
  16 + <sequenceFlow id="flow3" name="同意" sourceRef="exclusivegateway1" targetRef="hrVerify">
  17 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${deptLeaderApproved == 'true'}]]></conditionExpression>
  18 + </sequenceFlow>
  19 + <sequenceFlow id="flow4" sourceRef="hrVerify" targetRef="exclusivegateway2"></sequenceFlow>
  20 + <sequenceFlow id="flow5" name="同意" sourceRef="exclusivegateway2" targetRef="reportBack">
  21 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${hrApproved == 'true'}]]></conditionExpression>
  22 + </sequenceFlow>
  23 + <sequenceFlow id="flow6" sourceRef="reportBack" targetRef="endevent1">
  24 + <extensionElements>
  25 + <activiti:executionListener event="take" expression="${execution.setVariable('result', 'ok')}"></activiti:executionListener>
  26 + </extensionElements>
  27 + </sequenceFlow>
  28 + <sequenceFlow id="flow7" name="不同意" sourceRef="exclusivegateway2" targetRef="modifyApply">
  29 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${hrApproved == 'false'}]]></conditionExpression>
  30 + </sequenceFlow>
  31 + <sequenceFlow id="flow8" name="不同意" sourceRef="exclusivegateway1" targetRef="modifyApply">
  32 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${deptLeaderApproved == 'true'}]]></conditionExpression>
  33 + </sequenceFlow>
  34 + <sequenceFlow id="flow9" sourceRef="modifyApply" targetRef="exclusivegateway3"></sequenceFlow>
  35 + <sequenceFlow id="flow10" name="调整后继续申请" sourceRef="exclusivegateway3" targetRef="deptLeaderVerify">
  36 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${reApply == 'true'}]]></conditionExpression>
  37 + </sequenceFlow>
  38 + <sequenceFlow id="flow11" name="取消申请,并设置取消标志" sourceRef="exclusivegateway3" targetRef="endevent1">
  39 + <extensionElements>
  40 + <activiti:executionListener event="take" expression="${execution.setVariable('result', 'canceled')}"></activiti:executionListener>
  41 + </extensionElements>
  42 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${reApply == 'false'}]]></conditionExpression>
  43 + </sequenceFlow>
  44 + <textAnnotation id="textannotation1" textFormat="text/plain">
  45 + <text>请求被驳回后员工可以选择继续申请,或者取消本次申请</text>
  46 + </textAnnotation>
  47 + <association id="association1" sourceRef="modifyApply" targetRef="textannotation1"></association>
  48 + </process>
  49 + <bpmndi:BPMNDiagram id="BPMNDiagram_leave-formkey">
  50 + <bpmndi:BPMNPlane bpmnElement="leave-formkey" id="BPMNPlane_leave-formkey">
  51 + <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
  52 + <omgdc:Bounds height="35.0" width="35.0" x="10.0" y="50.0"></omgdc:Bounds>
  53 + </bpmndi:BPMNShape>
  54 + <bpmndi:BPMNShape bpmnElement="deptLeaderVerify" id="BPMNShape_deptLeaderVerify">
  55 + <omgdc:Bounds height="55.0" width="105.0" x="90.0" y="40.0"></omgdc:Bounds>
  56 + </bpmndi:BPMNShape>
  57 + <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
  58 + <omgdc:Bounds height="40.0" width="40.0" x="230.0" y="47.0"></omgdc:Bounds>
  59 + </bpmndi:BPMNShape>
  60 + <bpmndi:BPMNShape bpmnElement="hrVerify" id="BPMNShape_hrVerify">
  61 + <omgdc:Bounds height="55.0" width="105.0" x="310.0" y="40.0"></omgdc:Bounds>
  62 + </bpmndi:BPMNShape>
  63 + <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
  64 + <omgdc:Bounds height="40.0" width="40.0" x="470.0" y="47.0"></omgdc:Bounds>
  65 + </bpmndi:BPMNShape>
  66 + <bpmndi:BPMNShape bpmnElement="reportBack" id="BPMNShape_reportBack">
  67 + <omgdc:Bounds height="55.0" width="105.0" x="580.0" y="40.0"></omgdc:Bounds>
  68 + </bpmndi:BPMNShape>
  69 + <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
  70 + <omgdc:Bounds height="35.0" width="35.0" x="615.0" y="213.0"></omgdc:Bounds>
  71 + </bpmndi:BPMNShape>
  72 + <bpmndi:BPMNShape bpmnElement="modifyApply" id="BPMNShape_modifyApply">
  73 + <omgdc:Bounds height="55.0" width="105.0" x="198.0" y="120.0"></omgdc:Bounds>
  74 + </bpmndi:BPMNShape>
  75 + <bpmndi:BPMNShape bpmnElement="exclusivegateway3" id="BPMNShape_exclusivegateway3">
  76 + <omgdc:Bounds height="40.0" width="40.0" x="230.0" y="210.0"></omgdc:Bounds>
  77 + </bpmndi:BPMNShape>
  78 + <bpmndi:BPMNShape bpmnElement="textannotation1" id="BPMNShape_textannotation1">
  79 + <omgdc:Bounds height="57.0" width="112.0" x="340.0" y="168.0"></omgdc:Bounds>
  80 + </bpmndi:BPMNShape>
  81 + <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
  82 + <omgdi:waypoint x="45.0" y="67.0"></omgdi:waypoint>
  83 + <omgdi:waypoint x="90.0" y="67.0"></omgdi:waypoint>
  84 + </bpmndi:BPMNEdge>
  85 + <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
  86 + <omgdi:waypoint x="195.0" y="67.0"></omgdi:waypoint>
  87 + <omgdi:waypoint x="230.0" y="67.0"></omgdi:waypoint>
  88 + </bpmndi:BPMNEdge>
  89 + <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
  90 + <omgdi:waypoint x="270.0" y="67.0"></omgdi:waypoint>
  91 + <omgdi:waypoint x="310.0" y="67.0"></omgdi:waypoint>
  92 + <bpmndi:BPMNLabel>
  93 + <omgdc:Bounds height="11.0" width="22.0" x="269.0" y="50.0"></omgdc:Bounds>
  94 + </bpmndi:BPMNLabel>
  95 + </bpmndi:BPMNEdge>
  96 + <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
  97 + <omgdi:waypoint x="415.0" y="67.0"></omgdi:waypoint>
  98 + <omgdi:waypoint x="470.0" y="67.0"></omgdi:waypoint>
  99 + </bpmndi:BPMNEdge>
  100 + <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
  101 + <omgdi:waypoint x="510.0" y="67.0"></omgdi:waypoint>
  102 + <omgdi:waypoint x="580.0" y="67.0"></omgdi:waypoint>
  103 + <bpmndi:BPMNLabel>
  104 + <omgdc:Bounds height="11.0" width="22.0" x="529.0" y="50.0"></omgdc:Bounds>
  105 + </bpmndi:BPMNLabel>
  106 + </bpmndi:BPMNEdge>
  107 + <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
  108 + <omgdi:waypoint x="632.0" y="95.0"></omgdi:waypoint>
  109 + <omgdi:waypoint x="632.0" y="213.0"></omgdi:waypoint>
  110 + </bpmndi:BPMNEdge>
  111 + <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
  112 + <omgdi:waypoint x="490.0" y="87.0"></omgdi:waypoint>
  113 + <omgdi:waypoint x="490.0" y="147.0"></omgdi:waypoint>
  114 + <omgdi:waypoint x="303.0" y="147.0"></omgdi:waypoint>
  115 + <bpmndi:BPMNLabel>
  116 + <omgdc:Bounds height="11.0" width="33.0" x="438.0" y="119.0"></omgdc:Bounds>
  117 + </bpmndi:BPMNLabel>
  118 + </bpmndi:BPMNEdge>
  119 + <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
  120 + <omgdi:waypoint x="250.0" y="87.0"></omgdi:waypoint>
  121 + <omgdi:waypoint x="250.0" y="120.0"></omgdi:waypoint>
  122 + <bpmndi:BPMNLabel>
  123 + <omgdc:Bounds height="11.0" width="33.0" x="260.0" y="87.0"></omgdc:Bounds>
  124 + </bpmndi:BPMNLabel>
  125 + </bpmndi:BPMNEdge>
  126 + <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
  127 + <omgdi:waypoint x="250.0" y="175.0"></omgdi:waypoint>
  128 + <omgdi:waypoint x="250.0" y="210.0"></omgdi:waypoint>
  129 + </bpmndi:BPMNEdge>
  130 + <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
  131 + <omgdi:waypoint x="230.0" y="230.0"></omgdi:waypoint>
  132 + <omgdi:waypoint x="142.0" y="230.0"></omgdi:waypoint>
  133 + <omgdi:waypoint x="142.0" y="95.0"></omgdi:waypoint>
  134 + <bpmndi:BPMNLabel>
  135 + <omgdc:Bounds height="11.0" width="77.0" x="159.0" y="210.0"></omgdc:Bounds>
  136 + </bpmndi:BPMNLabel>
  137 + </bpmndi:BPMNEdge>
  138 + <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
  139 + <omgdi:waypoint x="270.0" y="230.0"></omgdi:waypoint>
  140 + <omgdi:waypoint x="615.0" y="230.0"></omgdi:waypoint>
  141 + <bpmndi:BPMNLabel>
  142 + <omgdc:Bounds height="33.0" width="100.0" x="58.0" y="-37.0"></omgdc:Bounds>
  143 + </bpmndi:BPMNLabel>
  144 + </bpmndi:BPMNEdge>
  145 + <bpmndi:BPMNEdge bpmnElement="association1" id="BPMNEdge_association1">
  146 + <omgdi:waypoint x="303.0" y="147.0"></omgdi:waypoint>
  147 + <omgdi:waypoint x="396.0" y="168.0"></omgdi:waypoint>
  148 + </bpmndi:BPMNEdge>
  149 + </bpmndi:BPMNPlane>
  150 + </bpmndi:BPMNDiagram>
  151 +</definitions>
0 \ No newline at end of file 152 \ No newline at end of file
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/leave-formkey/leave-formkey.png 0 → 100644

27.4 KB

yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/leave-formkey/leave-formkey.zip 0 → 100644
No preview for this file type
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/leave-formkey/leave-start.form 0 → 100644
  1 +<div class="control-group">
  2 + <label class="control-label" for="startDate">开始时间:</label>
  3 + <div class="controls">
  4 + <input type="text" id="startDate" name="startDate" class="datepicker" data-date-format="yyyy-mm-dd" required />
  5 + </div>
  6 +</div>
  7 +<div class="control-group">
  8 + <label class="control-label" for="endDate">结束时间:</label>
  9 + <div class="controls">
  10 + <input type="text" id="endDate" name="endDate" class="datepicker" data-date-format="yyyy-mm-dd" required />
  11 + </div>
  12 +</div>
  13 +<div class="control-group">
  14 + <label class="control-label" for="reason">请假原因:</label>
  15 + <div class="controls">
  16 + <textarea id="reason" name="reason" required></textarea>
  17 + </div>
  18 +</div>
0 \ No newline at end of file 19 \ No newline at end of file
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/leave-formkey/modify-apply.form 0 → 100644
  1 +<div class="control-group">
  2 + <label class="control-label" for="startDate">开始时间:</label>
  3 + <div class="controls">
  4 + <input type="text" id="startDate" name="startDate" value="${startDate}" class="datepicker" data-date-format="yyyy-mm-dd" required />
  5 + </div>
  6 +</div>
  7 +<div class="control-group">
  8 + <label class="control-label" for="endDate">结束时间:</label>
  9 + <div class="controls">
  10 + <input type="text" id="endDate" name="endDate" value="${endDate}" class="datepicker" data-date-format="yyyy-mm-dd" required />
  11 + </div>
  12 +</div>
  13 +<div class="control-group">
  14 + <label class="control-label" for="reason">请假原因:</label>
  15 + <div class="controls">
  16 + <textarea id="reason" name="reason" required>${reason}</textarea>
  17 + </div>
  18 +</div>
  19 +<div class="control-group">
  20 + <label class="control-label" for="reason">是否继续申请:</label>
  21 + <div class="controls">
  22 + <select id="reApply" name="reApply">
  23 + <option value='true'>重新申请</option>
  24 + <option value='false'>结束流程</option>
  25 + </select>
  26 + </div>
  27 +</div>
0 \ No newline at end of file 28 \ No newline at end of file
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/leave-formkey/report-back.form 0 → 100644
  1 +<div class="control-group">
  2 + <label class="control-label" for="startDate">申请人:</label>
  3 + <div class="controls">${applyUserId}</div>
  4 +</div>
  5 +<div class="control-group">
  6 + <label class="control-label" for="startDate">开始时间:</label>
  7 + <div class="controls">
  8 + <input type="text" id="startDate" name="startDate" value="${startDate}" readonly />
  9 + </div>
  10 +</div>
  11 +<div class="control-group">
  12 + <label class="control-label" for="endDate">结束时间:</label>
  13 + <div class="controls">
  14 + <input type="text" id="endDate" name="endDate" value="${endDate}" readonly />
  15 + </div>
  16 +</div>
  17 +<div class="control-group">
  18 + <label class="control-label" for="reason">请假原因:</label>
  19 + <div class="controls">
  20 + <textarea id="reason" name="reason" readonly>${reason}</textarea>
  21 + </div>
  22 +</div>
  23 +<div class="control-group">
  24 + <label class="control-label" for="reportBackDate">销假日期:</label>
  25 + <div class="controls">
  26 + <input type="text" id="reportBackDate" name="reportBackDate" class="datepicker" data-date-format="yyyy-mm-dd" required />
  27 + </div>
  28 +</div>
0 \ No newline at end of file 29 \ No newline at end of file
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/leave-timeLimit-money/approve-deptLeader.form 0 → 100644
  1 +<div class="control-group">
  2 + <label class="control-label" for="startDate">申请人:</label>
  3 + <div class="controls">${applyUserId}</div>
  4 +</div>
  5 +<div class="control-group">
  6 + <label class="control-label" for="startDate">开始时间:</label>
  7 + <div class="controls">
  8 + <input type="text" id="startDate" name="startDate" value="${startDate}" readonly />
  9 + </div>
  10 +</div>
  11 +<div class="control-group">
  12 + <label class="control-label" for="endDate">结束时间:</label>
  13 + <div class="controls">
  14 + <input type="text" id="endDate" name="endDate" value="${endDate}" readonly />
  15 + </div>
  16 +</div>
  17 +<div class="control-group">
  18 + <label class="control-label" for="reason">请假原因:</label>
  19 + <div class="controls">
  20 + <textarea id="reason" name="reason" readonly>${reason}</textarea>
  21 + </div>
  22 +</div>
  23 +<div class="control-group">
  24 + <label class="control-label" for="deptLeaderApproved">审批意见:</label>
  25 + <div class="controls">
  26 + <select name="deptLeaderApproved" id="deptLeaderApproved">
  27 + <option value="true">同意</option>
  28 + <option value="false">拒绝</option>
  29 + </select>
  30 + </div>
  31 +</div>
0 \ No newline at end of file 32 \ No newline at end of file
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/leave-timeLimit-money/approve-hr.form 0 → 100644
  1 +<div class="control-group">
  2 + <label class="control-label" for="startDate">申请人:</label>
  3 + <div class="controls">${applyUserId}</div>
  4 +</div>
  5 +<div class="control-group">
  6 + <label class="control-label" for="startDate">开始时间:</label>
  7 + <div class="controls">
  8 + <input type="text" id="startDate" name="startDate" value="${startDate}" readonly />
  9 + </div>
  10 +</div>
  11 +<div class="control-group">
  12 + <label class="control-label" for="endDate">结束时间:</label>
  13 + <div class="controls">
  14 + <input type="text" id="endDate" name="endDate" value="${endDate}" readonly />
  15 + </div>
  16 +</div>
  17 +<div class="control-group">
  18 + <label class="control-label" for="reason">请假原因:</label>
  19 + <div class="controls">
  20 + <textarea id="reason" name="reason" readonly>${reason}</textarea>
  21 + </div>
  22 +</div>
  23 +<div class="control-group">
  24 + <label class="control-label" for="hrApproved">审批意见:</label>
  25 + <div class="controls">
  26 + <select name="hrApproved" id="hrApproved">
  27 + <option value="true">同意</option>
  28 + <option value="false">拒绝</option>
  29 + </select>
  30 + </div>
  31 +</div>
0 \ No newline at end of file 32 \ No newline at end of file
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/leave-timeLimit-money/leave-formkey-ext.bpmn 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 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.kafeitu.me/activiti">
  3 + <process id="conditionTest" name="请假流程-外置表单" isExecutable="true">
  4 + <documentation>《Activiti实战》第6章的例子--外置表单</documentation>
  5 + <extensionElements>
  6 + <activiti:executionListener event="start" delegateExpression="${execution.setVariable('leave', leaveEntityManager.newLeave(execution))}"></activiti:executionListener>
  7 + </extensionElements>
  8 + <startEvent id="startevent1" name="Start" activiti:initiator="applyUserId" activiti:formKey="chapter6/leave-timeLimit-money/leave-start.form"></startEvent>
  9 + <userTask id="deptLeaderVerify" name="部门经理审批" activiti:candidateGroups="deptLeader" activiti:formKey="chapter6/leave-timeLimit-money/approve-deptLeader.form">
  10 + <extensionElements>
  11 + <activiti:taskListener event="complete" expression="${leave.setDeptLeaderApproved(deptLeaderApproved)}"></activiti:taskListener>
  12 + </extensionElements>
  13 + </userTask>
  14 + <exclusiveGateway id="exclusivegateway1" name="Exclusive Gateway"></exclusiveGateway>
  15 + <userTask id="hrVerify" name="人事经理审批" activiti:candidateGroups="hr" activiti:formKey="chapter6/leave-timeLimit-money/approve-hr.form"></userTask>
  16 + <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
  17 + <endEvent id="endevent1" name="End"></endEvent>
  18 + <userTask id="modifyApply" name="调整申请内容" activiti:assignee="${applyUserId}" activiti:formKey="chapter6/leave-timeLimit-money/modify-apply.form"></userTask>
  19 + <exclusiveGateway id="exclusivegateway3" name="Exclusive Gateway"></exclusiveGateway>
  20 + <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="deptLeaderVerify"></sequenceFlow>
  21 + <sequenceFlow id="flow2" sourceRef="deptLeaderVerify" targetRef="exclusivegateway1"></sequenceFlow>
  22 + <sequenceFlow id="flow3" name="同意" sourceRef="exclusivegateway1" targetRef="hrVerify">
  23 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${deptLeaderApproved == 'true'}]]></conditionExpression>
  24 + </sequenceFlow>
  25 + <sequenceFlow id="flow4" sourceRef="hrVerify" targetRef="exclusivegateway2"></sequenceFlow>
  26 + <sequenceFlow id="flow7" name="不同意" sourceRef="exclusivegateway2" targetRef="modifyApply">
  27 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${hrApproved == 'false'}]]></conditionExpression>
  28 + </sequenceFlow>
  29 + <sequenceFlow id="flow8" name="不同意" sourceRef="exclusivegateway1" targetRef="modifyApply">
  30 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${deptLeaderApproved == 'true'}]]></conditionExpression>
  31 + </sequenceFlow>
  32 + <sequenceFlow id="flow9" sourceRef="modifyApply" targetRef="exclusivegateway3"></sequenceFlow>
  33 + <sequenceFlow id="flow10" name="调整后继续申请" sourceRef="exclusivegateway3" targetRef="deptLeaderVerify">
  34 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${reApply == 'true'}]]></conditionExpression>
  35 + </sequenceFlow>
  36 + <sequenceFlow id="flow11" name="取消申请,并设置取消标志" sourceRef="exclusivegateway3" targetRef="endevent1">
  37 + <extensionElements>
  38 + <activiti:executionListener event="take" expression="${execution.setVariable('result', 'canceled')}"></activiti:executionListener>
  39 + </extensionElements>
  40 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${reApply == 'false'}]]></conditionExpression>
  41 + </sequenceFlow>
  42 + <exclusiveGateway id="exclusivegateway4" name="Exclusive Gateway"></exclusiveGateway>
  43 + <sequenceFlow id="flow12" name="同意" sourceRef="exclusivegateway2" targetRef="exclusivegateway4">
  44 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${hrApproved == 'true'}]]></conditionExpression>
  45 + </sequenceFlow>
  46 + <userTask id="usertask1" name="财务打款" activiti:candidateGroups="caiwu" activiti:dueDate="${moneyDateVariable}">
  47 + <documentation>倒计时30秒</documentation>
  48 + </userTask>
  49 + <sequenceFlow id="flow13" name="金额 &gt;= 1万元" sourceRef="exclusivegateway4" targetRef="usertask1">
  50 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${amountMoney >= 10000}]]></conditionExpression>
  51 + </sequenceFlow>
  52 + <userTask id="usertask2" name="金额不够重新付款"></userTask>
  53 + <sequenceFlow id="flow14" name="金额 &lt; 1万" sourceRef="exclusivegateway4" targetRef="usertask2">
  54 + <conditionExpression xsi:type="tFormalExpression"><![CDATA[${amountMoney < 10000}]]></conditionExpression>
  55 + </sequenceFlow>
  56 + <userTask id="usertask3" name="打款完成" activiti:candidateGroups="chuNa"></userTask>
  57 + <sequenceFlow id="flow15" sourceRef="usertask1" targetRef="usertask3"></sequenceFlow>
  58 + <textAnnotation id="textannotation1" textFormat="text/plain">
  59 + <text>请求被驳回后员工可以选择继续申请,或者取消本次申请</text>
  60 + </textAnnotation>
  61 + <association id="association1" sourceRef="modifyApply" targetRef="textannotation1"></association>
  62 + </process>
  63 + <bpmndi:BPMNDiagram id="BPMNDiagram_conditionTest">
  64 + <bpmndi:BPMNPlane bpmnElement="conditionTest" id="BPMNPlane_conditionTest">
  65 + <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
  66 + <omgdc:Bounds height="35.0" width="35.0" x="10.0" y="50.0"></omgdc:Bounds>
  67 + </bpmndi:BPMNShape>
  68 + <bpmndi:BPMNShape bpmnElement="deptLeaderVerify" id="BPMNShape_deptLeaderVerify">
  69 + <omgdc:Bounds height="55.0" width="105.0" x="90.0" y="40.0"></omgdc:Bounds>
  70 + </bpmndi:BPMNShape>
  71 + <bpmndi:BPMNShape bpmnElement="exclusivegateway1" id="BPMNShape_exclusivegateway1">
  72 + <omgdc:Bounds height="40.0" width="40.0" x="230.0" y="47.0"></omgdc:Bounds>
  73 + </bpmndi:BPMNShape>
  74 + <bpmndi:BPMNShape bpmnElement="hrVerify" id="BPMNShape_hrVerify">
  75 + <omgdc:Bounds height="55.0" width="105.0" x="310.0" y="40.0"></omgdc:Bounds>
  76 + </bpmndi:BPMNShape>
  77 + <bpmndi:BPMNShape bpmnElement="exclusivegateway2" id="BPMNShape_exclusivegateway2">
  78 + <omgdc:Bounds height="40.0" width="40.0" x="470.0" y="47.0"></omgdc:Bounds>
  79 + </bpmndi:BPMNShape>
  80 + <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
  81 + <omgdc:Bounds height="35.0" width="35.0" x="615.0" y="213.0"></omgdc:Bounds>
  82 + </bpmndi:BPMNShape>
  83 + <bpmndi:BPMNShape bpmnElement="modifyApply" id="BPMNShape_modifyApply">
  84 + <omgdc:Bounds height="55.0" width="105.0" x="198.0" y="120.0"></omgdc:Bounds>
  85 + </bpmndi:BPMNShape>
  86 + <bpmndi:BPMNShape bpmnElement="exclusivegateway3" id="BPMNShape_exclusivegateway3">
  87 + <omgdc:Bounds height="40.0" width="40.0" x="230.0" y="210.0"></omgdc:Bounds>
  88 + </bpmndi:BPMNShape>
  89 + <bpmndi:BPMNShape bpmnElement="exclusivegateway4" id="BPMNShape_exclusivegateway4">
  90 + <omgdc:Bounds height="40.0" width="40.0" x="600.0" y="47.0"></omgdc:Bounds>
  91 + </bpmndi:BPMNShape>
  92 + <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
  93 + <omgdc:Bounds height="55.0" width="105.0" x="760.0" y="40.0"></omgdc:Bounds>
  94 + </bpmndi:BPMNShape>
  95 + <bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
  96 + <omgdc:Bounds height="55.0" width="105.0" x="568.0" y="140.0"></omgdc:Bounds>
  97 + </bpmndi:BPMNShape>
  98 + <bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">
  99 + <omgdc:Bounds height="55.0" width="105.0" x="910.0" y="40.0"></omgdc:Bounds>
  100 + </bpmndi:BPMNShape>
  101 + <bpmndi:BPMNShape bpmnElement="textannotation1" id="BPMNShape_textannotation1">
  102 + <omgdc:Bounds height="57.0" width="112.0" x="340.0" y="168.0"></omgdc:Bounds>
  103 + </bpmndi:BPMNShape>
  104 + <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
  105 + <omgdi:waypoint x="45.0" y="67.0"></omgdi:waypoint>
  106 + <omgdi:waypoint x="90.0" y="67.0"></omgdi:waypoint>
  107 + </bpmndi:BPMNEdge>
  108 + <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
  109 + <omgdi:waypoint x="195.0" y="67.0"></omgdi:waypoint>
  110 + <omgdi:waypoint x="230.0" y="67.0"></omgdi:waypoint>
  111 + </bpmndi:BPMNEdge>
  112 + <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
  113 + <omgdi:waypoint x="270.0" y="67.0"></omgdi:waypoint>
  114 + <omgdi:waypoint x="310.0" y="67.0"></omgdi:waypoint>
  115 + <bpmndi:BPMNLabel>
  116 + <omgdc:Bounds height="42.0" width="22.0" x="269.0" y="50.0"></omgdc:Bounds>
  117 + </bpmndi:BPMNLabel>
  118 + </bpmndi:BPMNEdge>
  119 + <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
  120 + <omgdi:waypoint x="415.0" y="67.0"></omgdi:waypoint>
  121 + <omgdi:waypoint x="470.0" y="67.0"></omgdi:waypoint>
  122 + </bpmndi:BPMNEdge>
  123 + <bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
  124 + <omgdi:waypoint x="490.0" y="87.0"></omgdi:waypoint>
  125 + <omgdi:waypoint x="490.0" y="147.0"></omgdi:waypoint>
  126 + <omgdi:waypoint x="303.0" y="147.0"></omgdi:waypoint>
  127 + <bpmndi:BPMNLabel>
  128 + <omgdc:Bounds height="42.0" width="33.0" x="438.0" y="119.0"></omgdc:Bounds>
  129 + </bpmndi:BPMNLabel>
  130 + </bpmndi:BPMNEdge>
  131 + <bpmndi:BPMNEdge bpmnElement="flow8" id="BPMNEdge_flow8">
  132 + <omgdi:waypoint x="250.0" y="87.0"></omgdi:waypoint>
  133 + <omgdi:waypoint x="250.0" y="120.0"></omgdi:waypoint>
  134 + <bpmndi:BPMNLabel>
  135 + <omgdc:Bounds height="42.0" width="33.0" x="260.0" y="87.0"></omgdc:Bounds>
  136 + </bpmndi:BPMNLabel>
  137 + </bpmndi:BPMNEdge>
  138 + <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
  139 + <omgdi:waypoint x="250.0" y="175.0"></omgdi:waypoint>
  140 + <omgdi:waypoint x="250.0" y="210.0"></omgdi:waypoint>
  141 + </bpmndi:BPMNEdge>
  142 + <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
  143 + <omgdi:waypoint x="230.0" y="230.0"></omgdi:waypoint>
  144 + <omgdi:waypoint x="142.0" y="230.0"></omgdi:waypoint>
  145 + <omgdi:waypoint x="142.0" y="95.0"></omgdi:waypoint>
  146 + <bpmndi:BPMNLabel>
  147 + <omgdc:Bounds height="42.0" width="77.0" x="159.0" y="210.0"></omgdc:Bounds>
  148 + </bpmndi:BPMNLabel>
  149 + </bpmndi:BPMNEdge>
  150 + <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
  151 + <omgdi:waypoint x="270.0" y="230.0"></omgdi:waypoint>
  152 + <omgdi:waypoint x="615.0" y="230.0"></omgdi:waypoint>
  153 + <bpmndi:BPMNLabel>
  154 + <omgdc:Bounds height="42.0" width="100.0" x="58.0" y="-37.0"></omgdc:Bounds>
  155 + </bpmndi:BPMNLabel>
  156 + </bpmndi:BPMNEdge>
  157 + <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
  158 + <omgdi:waypoint x="510.0" y="67.0"></omgdi:waypoint>
  159 + <omgdi:waypoint x="600.0" y="67.0"></omgdi:waypoint>
  160 + <bpmndi:BPMNLabel>
  161 + <omgdc:Bounds height="14.0" width="24.0" x="510.0" y="67.0"></omgdc:Bounds>
  162 + </bpmndi:BPMNLabel>
  163 + </bpmndi:BPMNEdge>
  164 + <bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">
  165 + <omgdi:waypoint x="640.0" y="67.0"></omgdi:waypoint>
  166 + <omgdi:waypoint x="760.0" y="67.0"></omgdi:waypoint>
  167 + <bpmndi:BPMNLabel>
  168 + <omgdc:Bounds height="14.0" width="72.0" x="640.0" y="67.0"></omgdc:Bounds>
  169 + </bpmndi:BPMNLabel>
  170 + </bpmndi:BPMNEdge>
  171 + <bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">
  172 + <omgdi:waypoint x="620.0" y="87.0"></omgdi:waypoint>
  173 + <omgdi:waypoint x="620.0" y="140.0"></omgdi:waypoint>
  174 + <bpmndi:BPMNLabel>
  175 + <omgdc:Bounds height="14.0" width="54.0" x="620.0" y="87.0"></omgdc:Bounds>
  176 + </bpmndi:BPMNLabel>
  177 + </bpmndi:BPMNEdge>
  178 + <bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15">
  179 + <omgdi:waypoint x="865.0" y="67.0"></omgdi:waypoint>
  180 + <omgdi:waypoint x="910.0" y="67.0"></omgdi:waypoint>
  181 + </bpmndi:BPMNEdge>
  182 + <bpmndi:BPMNEdge bpmnElement="association1" id="BPMNEdge_association1">
  183 + <omgdi:waypoint x="303.0" y="147.0"></omgdi:waypoint>
  184 + <omgdi:waypoint x="396.0" y="168.0"></omgdi:waypoint>
  185 + </bpmndi:BPMNEdge>
  186 + </bpmndi:BPMNPlane>
  187 + </bpmndi:BPMNDiagram>
  188 +</definitions>
0 \ No newline at end of file 189 \ No newline at end of file
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/leave-timeLimit-money/leave-formkey-ext.png 0 → 100644

17.3 KB

yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/leave-timeLimit-money/leave-start.form 0 → 100644
  1 +<div class="control-group">
  2 + <label class="control-label" for="startDate">开始时间:</label>
  3 + <div class="controls">
  4 + <input type="text" id="startDate" name="startDate" class="datepicker" data-date-format="yyyy-mm-dd" required />
  5 + </div>
  6 +</div>
  7 +<div class="control-group">
  8 + <label class="control-label" for="endDate">结束时间:</label>
  9 + <div class="controls">
  10 + <input type="text" id="endDate" name="endDate" class="datepicker" data-date-format="yyyy-mm-dd" required />
  11 + </div>
  12 +</div>
  13 +<div class="control-group">
  14 + <label class="control-label" for="reason">请假原因:</label>
  15 + <div class="controls">
  16 + <textarea id="reason" name="reason" required></textarea>
  17 + </div>
  18 +</div>
0 \ No newline at end of file 19 \ No newline at end of file
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/leave-timeLimit-money/modify-apply.form 0 → 100644
  1 +<div class="control-group">
  2 + <label class="control-label" for="startDate">开始时间:</label>
  3 + <div class="controls">
  4 + <input type="text" id="startDate" name="startDate" value="${startDate}" class="datepicker" data-date-format="yyyy-mm-dd" required />
  5 + </div>
  6 +</div>
  7 +<div class="control-group">
  8 + <label class="control-label" for="endDate">结束时间:</label>
  9 + <div class="controls">
  10 + <input type="text" id="endDate" name="endDate" value="${endDate}" class="datepicker" data-date-format="yyyy-mm-dd" required />
  11 + </div>
  12 +</div>
  13 +<div class="control-group">
  14 + <label class="control-label" for="reason">请假原因:</label>
  15 + <div class="controls">
  16 + <textarea id="reason" name="reason" required>${reason}</textarea>
  17 + </div>
  18 +</div>
  19 +<div class="control-group">
  20 + <label class="control-label" for="reason">是否继续申请:</label>
  21 + <div class="controls">
  22 + <select id="reApply" name="reApply">
  23 + <option value='true'>重新申请</option>
  24 + <option value='false'>结束流程</option>
  25 + </select>
  26 + </div>
  27 +</div>
0 \ No newline at end of file 28 \ No newline at end of file
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/chapter6/leave-timeLimit-money/report-back.form 0 → 100644
  1 +<div class="control-group">
  2 + <label class="control-label" for="startDate">申请人:</label>
  3 + <div class="controls">${applyUserId}</div>
  4 +</div>
  5 +<div class="control-group">
  6 + <label class="control-label" for="startDate">开始时间:</label>
  7 + <div class="controls">
  8 + <input type="text" id="startDate" name="startDate" value="${startDate}" readonly />
  9 + </div>
  10 +</div>
  11 +<div class="control-group">
  12 + <label class="control-label" for="endDate">结束时间:</label>
  13 + <div class="controls">
  14 + <input type="text" id="endDate" name="endDate" value="${endDate}" readonly />
  15 + </div>
  16 +</div>
  17 +<div class="control-group">
  18 + <label class="control-label" for="reason">请假原因:</label>
  19 + <div class="controls">
  20 + <textarea id="reason" name="reason" readonly>${reason}</textarea>
  21 + </div>
  22 +</div>
  23 +<div class="control-group">
  24 + <label class="control-label" for="reportBackDate">销假日期:</label>
  25 + <div class="controls">
  26 + <input type="text" id="reportBackDate" name="reportBackDate" class="datepicker" data-date-format="yyyy-mm-dd" required />
  27 + </div>
  28 +</div>
0 \ No newline at end of file 29 \ No newline at end of file
yudao-module-bpm/yudao-module-bpm-impl-flowable/src/test/resources/flowable.cfg.xml 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3 + xsi:schemaLocation="http://www.springframework.org/schema/beans
  4 + http://www.springframework.org/schema/beans/spring-beans.xsd">
  5 +
  6 + <bean id="processEngineConfiguration" class="org.flowable.engine.impl.cfg.StandaloneProcessEngineConfiguration">
  7 + <!--保存到文件模式-->
  8 + <!--<property name="jdbcUrl" value="jdbc:h2:file:~/activiti-in-action-chapter6;AUTO_SERVER=TRUE" />-->
  9 + <!--内存模式-->
  10 + <property name="jdbcUrl" value="jdbc:h2:mem:activiti-in-action-chapter6;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE" />
  11 + <property name="jdbcDriver" value="org.h2.Driver" />
  12 + <property name="jdbcUsername" value="sa" />
  13 + <property name="jdbcPassword" value="" />
  14 +
  15 + <!--HistoryLevel-->
  16 + <property name="history" value="full" />
  17 + <property name="databaseSchemaUpdate" value="true" />
  18 + <property name="flowable5CompatibilityEnabled" value="true" />
  19 +<!-- <property name="jobExecutorActivate" value="false" />-->
  20 + </bean>
  21 +</beans>
0 \ No newline at end of file 22 \ No newline at end of file