ALTER TABLE blade_wf_button ADD COLUMN tenant_id VARCHAR(12) DEFAULT '000000' COMMENT '租户ID';
ALTER TABLE blade_wf_category ADD COLUMN tenant_id VARCHAR(12) DEFAULT '000000' COMMENT '租户ID';
ALTER TABLE blade_wf_form ADD COLUMN tenant_id VARCHAR(12) DEFAULT '000000' COMMENT '租户ID';
ALTER TABLE blade_wf_form_default_values ADD COLUMN tenant_id VARCHAR(12) DEFAULT '000000' COMMENT '租户ID';

INSERT INTO `ACT_DE_MODEL`(`id`, `name`, `model_key`, `form_key`, `description`, `model_comment`, `created`, `created_by`, `last_updated`, `last_updated_by`, `version`, `xml`, `model_editor_json`, `thumbnail`, `model_type`, `tenant_id`) VALUES ('0676f2277420b7dc67f69dd3a0ec1164', '请假流程 - 外置表单', 'ex_leave', 'wf_ex_Leave', NULL, NULL, '2021-06-08 08:40:51.901000', '1123598821738675201', '2021-06-09 13:31:19.262000', '1123598821738675201', 1, '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<definitions xmlns=\"http://www.omg.org/spec/BPMN/20100524/MODEL\" 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:flowable=\"http://flowable.org/bpmn\" xmlns:activiti=\"http://activiti.org/bpmn\" xmlns:camunda=\"http://camunda.org/schema/1.0/bpmn\" targetNamespace=\"http://bpmn.io/schema/bpmn\">\n  <process id=\"ex_leave\" name=\"请假流程 - 外置表单\" isExecutable=\"true\" flowable:skipFirstNode=\"true\" flowable:rollbackNode=\"Activity_1bvvbi2\">\n    <extensionElements>\n      <flowable:serial name=\"测试流水号\" prefix=\"SQ\" dateFormat=\"yyyyMMdd\" suffixLength=\"5\" startSequence=\"0\" connector=\"\" cycle=\"none\" />\n    </extensionElements>\n    <startEvent id=\"startEvent_1\" name=\"开始\" flowable:exFormKey=\"Leave\">\n      <extensionElements>\n        <flowable:formProperty id=\"datetime\" name=\"请假时间\" readable=\"true\" writable=\"true\" />\n        <flowable:formProperty id=\"days\" name=\"请假天数\" readable=\"true\" writable=\"true\" />\n        <flowable:formProperty id=\"reason\" name=\"请假理由\" readable=\"true\" writable=\"true\" />\n      </extensionElements>\n      <outgoing>Flow_1itpbiu</outgoing>\n    </startEvent>\n    <userTask id=\"Activity_1bvvbi2\" name=\"发起人\" flowable:exFormKey=\"Leave\" flowable:assignee=\"${applyUser}\" flowable:hideCopy=\"true\">\n      <extensionElements>\n        <flowable:formProperty id=\"datetime\" name=\"请假时间\" readable=\"true\" writable=\"true\" />\n        <flowable:formProperty id=\"days\" name=\"请假天数\" readable=\"true\" writable=\"true\" />\n        <flowable:formProperty id=\"reason\" name=\"请假理由\" readable=\"true\" writable=\"true\" />\n        <flowable:button label=\"通过\" prop=\"wf_pass\" display=\"true\" />\n        <flowable:button label=\"驳回\" prop=\"wf_reject\" display=\"true\" />\n        <flowable:button label=\"打印\" prop=\"wf_print\" display=\"true\" />\n        <flowable:button label=\"转办\" prop=\"wf_transfer\" display=\"true\" />\n        <flowable:button label=\"委托\" prop=\"wf_delegate\" display=\"true\" />\n        <flowable:button label=\"终止\" prop=\"wf_terminate\" display=\"true\" />\n        <flowable:button label=\"加签\" prop=\"wf_add_instance\" display=\"true\" />\n        <flowable:button label=\"减签\" prop=\"wf_del_instance\" display=\"true\" />\n        <flowable:button label=\"指定回退\" prop=\"wf_rollback\" display=\"true\" />\n      </extensionElements>\n      <incoming>Flow_1itpbiu</incoming>\n      <outgoing>Flow_0eeuztq</outgoing>\n    </userTask>\n    <sequenceFlow id=\"Flow_1itpbiu\" sourceRef=\"startEvent_1\" targetRef=\"Activity_1bvvbi2\" />\n    <userTask id=\"Activity_0xqgcpk\" name=\"人事\" flowable:exFormKey=\"Leave\" flowable:candidateUsers=\"1123598821738675202\">\n      <extensionElements>\n        <flowable:button label=\"通过\" prop=\"wf_pass\" display=\"true\" />\n        <flowable:button label=\"驳回\" prop=\"wf_reject\" display=\"true\" />\n        <flowable:button label=\"打印\" prop=\"wf_print\" display=\"true\" />\n        <flowable:button label=\"转办\" prop=\"wf_transfer\" display=\"true\" />\n        <flowable:button label=\"委托\" prop=\"wf_delegate\" display=\"true\" />\n        <flowable:button label=\"终止\" prop=\"wf_terminate\" display=\"true\" />\n        <flowable:button label=\"加签\" prop=\"wf_add_instance\" display=\"true\" />\n        <flowable:button label=\"减签\" prop=\"wf_del_instance\" display=\"true\" />\n        <flowable:button label=\"指定回退\" prop=\"wf_rollback\" display=\"true\" />\n        <flowable:formProperty id=\"datetime\" name=\"请假时间\" readable=\"true\" writable=\"false\" />\n        <flowable:formProperty id=\"days\" name=\"请假天数\" readable=\"true\" writable=\"false\" />\n        <flowable:formProperty id=\"reason\" name=\"请假理由\" readable=\"true\" writable=\"false\" />\n      </extensionElements>\n      <incoming>Flow_0eeuztq</incoming>\n      <outgoing>Flow_1vu0qon</outgoing>\n    </userTask>\n    <sequenceFlow id=\"Flow_0eeuztq\" sourceRef=\"Activity_1bvvbi2\" targetRef=\"Activity_0xqgcpk\" />\n    <userTask id=\"Activity_0k0fyan\" name=\"经理\" flowable:exFormKey=\"Leave\" flowable:candidateUsers=\"1123598821738675203\">\n      <extensionElements>\n        <flowable:button label=\"通过\" prop=\"wf_pass\" display=\"true\" />\n        <flowable:button label=\"驳回\" prop=\"wf_reject\" display=\"true\" />\n        <flowable:button label=\"打印\" prop=\"wf_print\" display=\"true\" />\n        <flowable:button label=\"转办\" prop=\"wf_transfer\" display=\"true\" />\n        <flowable:button label=\"委托\" prop=\"wf_delegate\" display=\"true\" />\n        <flowable:button label=\"终止\" prop=\"wf_terminate\" display=\"true\" />\n        <flowable:button label=\"加签\" prop=\"wf_add_instance\" display=\"true\" />\n        <flowable:button label=\"减签\" prop=\"wf_del_instance\" display=\"true\" />\n        <flowable:button label=\"指定回退\" prop=\"wf_rollback\" display=\"true\" />\n        <flowable:formProperty id=\"datetime\" name=\"请假时间\" readable=\"true\" writable=\"false\" />\n        <flowable:formProperty id=\"days\" name=\"请假天数\" readable=\"true\" writable=\"false\" />\n        <flowable:formProperty id=\"reason\" name=\"请假理由\" readable=\"true\" writable=\"false\" />\n      </extensionElements>\n      <incoming>Flow_1vu0qon</incoming>\n      <outgoing>Flow_1d63z9m</outgoing>\n    </userTask>\n    <sequenceFlow id=\"Flow_1vu0qon\" sourceRef=\"Activity_0xqgcpk\" targetRef=\"Activity_0k0fyan\" />\n    <endEvent id=\"Event_06z26fy\">\n      <incoming>Flow_1d63z9m</incoming>\n    </endEvent>\n    <sequenceFlow id=\"Flow_1d63z9m\" sourceRef=\"Activity_0k0fyan\" targetRef=\"Event_06z26fy\" />\n  </process>\n  <bpmndi:BPMNDiagram id=\"BPMNDiagram_flow\">\n    <bpmndi:BPMNPlane id=\"BPMNPlane_flow\" bpmnElement=\"ex_leave\">\n      <bpmndi:BPMNEdge id=\"Flow_1d63z9m_di\" bpmnElement=\"Flow_1d63z9m\">\n        <di:waypoint x=\"720\" y=\"215\" />\n        <di:waypoint x=\"772\" y=\"215\" />\n      </bpmndi:BPMNEdge>\n      <bpmndi:BPMNEdge id=\"Flow_1vu0qon_di\" bpmnElement=\"Flow_1vu0qon\">\n        <di:waypoint x=\"570\" y=\"215\" />\n        <di:waypoint x=\"620\" y=\"215\" />\n      </bpmndi:BPMNEdge>\n      <bpmndi:BPMNEdge id=\"Flow_0eeuztq_di\" bpmnElement=\"Flow_0eeuztq\">\n        <di:waypoint x=\"420\" y=\"215\" />\n        <di:waypoint x=\"470\" y=\"215\" />\n      </bpmndi:BPMNEdge>\n      <bpmndi:BPMNEdge id=\"Flow_1itpbiu_di\" bpmnElement=\"Flow_1itpbiu\">\n        <di:waypoint x=\"270\" y=\"215\" />\n        <di:waypoint x=\"320\" y=\"215\" />\n      </bpmndi:BPMNEdge>\n      <bpmndi:BPMNShape id=\"BPMNShape_startEvent_1\" bpmnElement=\"startEvent_1\">\n        <dc:Bounds x=\"240\" y=\"200\" width=\"30\" height=\"30\" />\n        <bpmndi:BPMNLabel>\n          <dc:Bounds x=\"243\" y=\"237\" width=\"22\" height=\"14\" />\n        </bpmndi:BPMNLabel>\n      </bpmndi:BPMNShape>\n      <bpmndi:BPMNShape id=\"Activity_1bvvbi2_di\" bpmnElement=\"Activity_1bvvbi2\">\n        <dc:Bounds x=\"320\" y=\"175\" width=\"100\" height=\"80\" />\n      </bpmndi:BPMNShape>\n      <bpmndi:BPMNShape id=\"Activity_0xqgcpk_di\" bpmnElement=\"Activity_0xqgcpk\">\n        <dc:Bounds x=\"470\" y=\"175\" width=\"100\" height=\"80\" />\n      </bpmndi:BPMNShape>\n      <bpmndi:BPMNShape id=\"Activity_0k0fyan_di\" bpmnElement=\"Activity_0k0fyan\">\n        <dc:Bounds x=\"620\" y=\"175\" width=\"100\" height=\"80\" />\n      </bpmndi:BPMNShape>\n      <bpmndi:BPMNShape id=\"Event_06z26fy_di\" bpmnElement=\"Event_06z26fy\">\n        <dc:Bounds x=\"772\" y=\"197\" width=\"36\" height=\"36\" />\n      </bpmndi:BPMNShape>\n    </bpmndi:BPMNPlane>\n  </bpmndi:BPMNDiagram>\n</definitions>\n', '{\"bounds\":{\"lowerRight\":{\"x\":1485.0,\"y\":700.0},\"upperLeft\":{\"x\":0.0,\"y\":0.0}},\"resourceId\":\"canvas\",\"stencil\":{\"id\":\"BPMNDiagram\"},\"stencilset\":{\"namespace\":\"http://b3mn.org/stencilset/bpmn2.0#\",\"url\":\"../editor/stencilsets/bpmn2.0/bpmn2.0.json\"},\"properties\":{\"process_id\":\"ex_leave\",\"name\":\"请假流程 - 外置表单\",\"process_namespace\":\"http://bpmn.io/schema/bpmn\",\"iseagerexecutionfetch\":false,\"messages\":[],\"executionlisteners\":{\"executionListeners\":[]},\"eventlisteners\":{\"eventListeners\":[]},\"signaldefinitions\":[],\"messagedefinitions\":[],\"escalationdefinitions\":[]},\"childShapes\":[{\"bounds\":{\"lowerRight\":{\"x\":270.0,\"y\":230.0},\"upperLeft\":{\"x\":240.0,\"y\":200.0}},\"resourceId\":\"startEvent_1\",\"childShapes\":[],\"stencil\":{\"id\":\"StartNoneEvent\"},\"properties\":{\"overrideid\":\"startEvent_1\",\"name\":\"开始\",\"interrupting\":true,\"formproperties\":{\"formProperties\":[{\"id\":\"datetime\",\"name\":\"请假时间\",\"type\":null,\"expression\":null,\"variable\":null,\"default\":null,\"required\":false,\"readable\":true,\"writable\":true},{\"id\":\"days\",\"name\":\"请假天数\",\"type\":null,\"expression\":null,\"variable\":null,\"default\":null,\"required\":false,\"readable\":true,\"writable\":true},{\"id\":\"reason\",\"name\":\"请假理由\",\"type\":null,\"expression\":null,\"variable\":null,\"default\":null,\"required\":false,\"readable\":true,\"writable\":true}]},\"executionlisteners\":{\"executionListeners\":[]}},\"outgoing\":[{\"resourceId\":\"Flow_1itpbiu\"}]},{\"bounds\":{\"lowerRight\":{\"x\":420.0,\"y\":255.0},\"upperLeft\":{\"x\":320.0,\"y\":175.0}},\"resourceId\":\"Activity_1bvvbi2\",\"childShapes\":[],\"stencil\":{\"id\":\"UserTask\"},\"properties\":{\"overrideid\":\"Activity_1bvvbi2\",\"name\":\"发起人\",\"usertaskassignment\":{\"assignment\":{\"type\":\"static\",\"assignee\":\"${applyUser}\"}},\"formproperties\":{\"formProperties\":[{\"id\":\"datetime\",\"name\":\"请假时间\",\"type\":null,\"expression\":null,\"variable\":null,\"default\":null,\"required\":false,\"readable\":true,\"writable\":true},{\"id\":\"days\",\"name\":\"请假天数\",\"type\":null,\"expression\":null,\"variable\":null,\"default\":null,\"required\":false,\"readable\":true,\"writable\":true},{\"id\":\"reason\",\"name\":\"请假理由\",\"type\":null,\"expression\":null,\"variable\":null,\"default\":null,\"required\":false,\"readable\":true,\"writable\":true}]},\"asynchronousdefinition\":false,\"exclusivedefinition\":true,\"isforcompensation\":false,\"tasklisteners\":{\"taskListeners\":[]},\"executionlisteners\":{\"executionListeners\":[]}},\"outgoing\":[{\"resourceId\":\"Flow_0eeuztq\"}]},{\"bounds\":{\"lowerRight\":{\"x\":172.0,\"y\":212.0},\"upperLeft\":{\"x\":128.0,\"y\":212.0}},\"resourceId\":\"Flow_1itpbiu\",\"childShapes\":[],\"stencil\":{\"id\":\"SequenceFlow\"},\"dockers\":[{\"x\":15.0,\"y\":15.0},{\"x\":50.0,\"y\":40.0}],\"outgoing\":[{\"resourceId\":\"Activity_1bvvbi2\"}],\"target\":{\"resourceId\":\"Activity_1bvvbi2\"},\"properties\":{\"overrideid\":\"Flow_1itpbiu\"}},{\"bounds\":{\"lowerRight\":{\"x\":570.0,\"y\":255.0},\"upperLeft\":{\"x\":470.0,\"y\":175.0}},\"resourceId\":\"Activity_0xqgcpk\",\"childShapes\":[],\"stencil\":{\"id\":\"UserTask\"},\"properties\":{\"overrideid\":\"Activity_0xqgcpk\",\"name\":\"人事\",\"usertaskassignment\":{\"assignment\":{\"type\":\"static\",\"candidateUsers\":[{\"value\":\"1123598821738675202\"}]}},\"formproperties\":{\"formProperties\":[{\"id\":\"datetime\",\"name\":\"请假时间\",\"type\":null,\"expression\":null,\"variable\":null,\"default\":null,\"required\":false,\"readable\":true,\"writable\":false},{\"id\":\"days\",\"name\":\"请假天数\",\"type\":null,\"expression\":null,\"variable\":null,\"default\":null,\"required\":false,\"readable\":true,\"writable\":false},{\"id\":\"reason\",\"name\":\"请假理由\",\"type\":null,\"expression\":null,\"variable\":null,\"default\":null,\"required\":false,\"readable\":true,\"writable\":false}]},\"asynchronousdefinition\":false,\"exclusivedefinition\":true,\"isforcompensation\":false,\"tasklisteners\":{\"taskListeners\":[]},\"executionlisteners\":{\"executionListeners\":[]}},\"outgoing\":[{\"resourceId\":\"Flow_1vu0qon\"}]},{\"bounds\":{\"lowerRight\":{\"x\":172.0,\"y\":212.0},\"upperLeft\":{\"x\":128.0,\"y\":212.0}},\"resourceId\":\"Flow_0eeuztq\",\"childShapes\":[],\"stencil\":{\"id\":\"SequenceFlow\"},\"dockers\":[{\"x\":50.0,\"y\":40.0},{\"x\":50.0,\"y\":40.0}],\"outgoing\":[{\"resourceId\":\"Activity_0xqgcpk\"}],\"target\":{\"resourceId\":\"Activity_0xqgcpk\"},\"properties\":{\"overrideid\":\"Flow_0eeuztq\"}},{\"bounds\":{\"lowerRight\":{\"x\":720.0,\"y\":255.0},\"upperLeft\":{\"x\":620.0,\"y\":175.0}},\"resourceId\":\"Activity_0k0fyan\",\"childShapes\":[],\"stencil\":{\"id\":\"UserTask\"},\"properties\":{\"overrideid\":\"Activity_0k0fyan\",\"name\":\"经理\",\"usertaskassignment\":{\"assignment\":{\"type\":\"static\",\"candidateUsers\":[{\"value\":\"1123598821738675203\"}]}},\"formproperties\":{\"formProperties\":[{\"id\":\"datetime\",\"name\":\"请假时间\",\"type\":null,\"expression\":null,\"variable\":null,\"default\":null,\"required\":false,\"readable\":true,\"writable\":false},{\"id\":\"days\",\"name\":\"请假天数\",\"type\":null,\"expression\":null,\"variable\":null,\"default\":null,\"required\":false,\"readable\":true,\"writable\":false},{\"id\":\"reason\",\"name\":\"请假理由\",\"type\":null,\"expression\":null,\"variable\":null,\"default\":null,\"required\":false,\"readable\":true,\"writable\":false}]},\"asynchronousdefinition\":false,\"exclusivedefinition\":true,\"isforcompensation\":false,\"tasklisteners\":{\"taskListeners\":[]},\"executionlisteners\":{\"executionListeners\":[]}},\"outgoing\":[{\"resourceId\":\"Flow_1d63z9m\"}]},{\"bounds\":{\"lowerRight\":{\"x\":172.0,\"y\":212.0},\"upperLeft\":{\"x\":128.0,\"y\":212.0}},\"resourceId\":\"Flow_1vu0qon\",\"childShapes\":[],\"stencil\":{\"id\":\"SequenceFlow\"},\"dockers\":[{\"x\":50.0,\"y\":40.0},{\"x\":50.0,\"y\":40.0}],\"outgoing\":[{\"resourceId\":\"Activity_0k0fyan\"}],\"target\":{\"resourceId\":\"Activity_0k0fyan\"},\"properties\":{\"overrideid\":\"Flow_1vu0qon\"}},{\"bounds\":{\"lowerRight\":{\"x\":808.0,\"y\":233.0},\"upperLeft\":{\"x\":772.0,\"y\":197.0}},\"resourceId\":\"Event_06z26fy\",\"childShapes\":[],\"stencil\":{\"id\":\"EndNoneEvent\"},\"properties\":{\"overrideid\":\"Event_06z26fy\",\"executionlisteners\":{\"executionListeners\":[]}},\"outgoing\":[]},{\"bounds\":{\"lowerRight\":{\"x\":172.0,\"y\":212.0},\"upperLeft\":{\"x\":128.0,\"y\":212.0}},\"resourceId\":\"Flow_1d63z9m\",\"childShapes\":[],\"stencil\":{\"id\":\"SequenceFlow\"},\"dockers\":[{\"x\":50.0,\"y\":40.0},{\"x\":18.0,\"y\":18.0}],\"outgoing\":[{\"resourceId\":\"Event_06z26fy\"}],\"target\":{\"resourceId\":\"Event_06z26fy\"},\"properties\":{\"overrideid\":\"Flow_1d63z9m\"}}]}', NULL, 0, '000000');
