Commit 2f88c13b authored by neo's avatar neo

[bugfix] fixed leave process start procces by key no by id

parent e277e507
......@@ -40,7 +40,7 @@ public class LeaveController {
@ResponseBody
@RequestMapping(value = "/save", method = RequestMethod.POST)
public Leave save(@RequestBody Leave user) {
ProcessInstance pi = runtimeService.startProcessInstanceById("leaveProcess");
ProcessInstance pi = runtimeService.startProcessInstanceByKey("leaveProcess");
user.setInstaceId(pi.getId());
insert(user);//todo use service insert
return user;
......
......@@ -2,19 +2,19 @@
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://www.activiti.org/testm1539743341882" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.w3.org/1999/XPath" id="m1539743341882" name="" targetNamespace="http://www.activiti.org/testm1539743341882" typeLanguage="http://www.w3.org/2001/XMLSchema">
<process id="leaveProcess" isClosed="false" isExecutable="true" name="LeaveProcess" processType="None">
<startEvent id="_2" name="StartEvent"/>
<userTask activiti:assignee="apply" activiti:exclusive="true" id="usertask1" name="请假申请"/>
<userTask activiti:assignee="apply" activiti:exclusive="true" id="usertask1" name="璇峰亣鐢宠"/>
<exclusiveGateway gatewayDirection="Unspecified" id="_4" name="ExclusiveGateway"/>
<userTask activiti:assignee="apply" activiti:exclusive="true" id="userTask2" name="审批(项目经理)"/>
<userTask activiti:assignee="boss" activiti:exclusive="true" id="usertask3" name="审批(?板?"/>
<userTask activiti:assignee="apply" activiti:exclusive="true" id="userTask2" name="瀹℃壒锛堥?鐩粡鐞嗭?"/>
<userTask activiti:assignee="boss" activiti:exclusive="true" id="usertask3" name="瀹℃壒锛堣�佹澘锛�"/>
<endEvent id="_7" name="EndEvent"/>
<sequenceFlow id="_8" sourceRef="_2" targetRef="usertask1"/>
<sequenceFlow id="_9" name="天数判断" sourceRef="usertask1" targetRef="_4">
<sequenceFlow id="_9" name="澶╂暟鍒ゆ柇" sourceRef="usertask1" targetRef="_4">
<documentation id="_9_D_1"/>
</sequenceFlow>
<sequenceFlow id="_10" name="小于3?" sourceRef="_4" targetRef="userTask2">
<sequenceFlow id="_10" name="灏忎?3澶�" sourceRef="_4" targetRef="userTask2">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${day<=3}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="_11" name="大于3?" sourceRef="_4" targetRef="usertask3">
<sequenceFlow id="_11" name="澶т簬3澶�" sourceRef="_4" targetRef="usertask3">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${day>3}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="_12" sourceRef="userTask2" targetRef="_7"/>
......@@ -58,42 +58,42 @@
<dc:Bounds height="32.0" width="32.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="_13" id="BPMNEdge__13" sourceElement="_6" targetElement="_7">
<bpmndi:BPMNEdge bpmnElement="_13" id="BPMNEdge__13" sourceElement="usertask3" targetElement="_7">
<di:waypoint x="695.0" y="322.5"/>
<di:waypoint x="795.0" y="256.0"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_12" id="BPMNEdge__12" sourceElement="_5" targetElement="_7">
<bpmndi:BPMNEdge bpmnElement="_12" id="BPMNEdge__12" sourceElement="userTask2" targetElement="_7">
<di:waypoint x="690.0" y="137.5"/>
<di:waypoint x="795.0" y="256.0"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_8" id="BPMNEdge__8" sourceElement="_2" targetElement="_3">
<bpmndi:BPMNEdge bpmnElement="_8" id="BPMNEdge__8" sourceElement="_2" targetElement="usertask1">
<di:waypoint x="137.0" y="216.0"/>
<di:waypoint x="205.0" y="217.5"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_9" id="BPMNEdge__9" sourceElement="_3" targetElement="_4">
<bpmndi:BPMNEdge bpmnElement="_9" id="BPMNEdge__9" sourceElement="usertask1" targetElement="_4">
<di:waypoint x="290.0" y="217.5"/>
<di:waypoint x="405.0" y="206.0"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_11" id="BPMNEdge__11" sourceElement="_4" targetElement="_6">
<bpmndi:BPMNEdge bpmnElement="_11" id="BPMNEdge__11" sourceElement="_4" targetElement="usertask3">
<di:waypoint x="437.0" y="206.0"/>
<di:waypoint x="610.0" y="322.5"/>
<bpmndi:BPMNLabel>
<dc:Bounds height="0.0" width="0.0" x="0.0" y="0.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="_10" id="BPMNEdge__10" sourceElement="_4" targetElement="_5">
<bpmndi:BPMNEdge bpmnElement="_10" id="BPMNEdge__10" sourceElement="_4" targetElement="userTask2">
<di:waypoint x="437.0" y="206.0"/>
<di:waypoint x="605.0" y="137.5"/>
<bpmndi:BPMNLabel>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment