工作流代码提交
This commit is contained in:
@@ -52,7 +52,7 @@ xxl:
|
||||
accessToken:
|
||||
executor:
|
||||
#执行器AppName [选填]:执行器心跳注册分组依据;为空则关闭自动注册
|
||||
appname: executor
|
||||
appname: xuyang
|
||||
#执行器注册 [选填]:优先使用该配置作为注册地址,为空时使用内嵌服务 ”IP:PORT“ 作为注册地址。从而更灵活的支持容器类型执行器动态IP和动态映射端口问题。
|
||||
address:
|
||||
#执行器IP [选填]:默认为空表示自动获取IP,多网卡时可手动设置指定IP,该IP不会绑定Host仅作为通讯实用;地址信息用于 "执行器注册" 和 "调度中心请求并触发任务";
|
||||
|
||||
@@ -221,9 +221,16 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
|
||||
String overItem = str.substring(0, str.indexOf("次") - 1);
|
||||
thsSupervise.setName(DateUtil.today() + dept.getName() + overRunLogList.get(0).getName() + "等" + overRunLogList.size() + "个监测点" + overItem);
|
||||
thsSuperviseMapper.insert(thsSupervise);
|
||||
|
||||
//TODO 解决工作流写死问题
|
||||
Map<String, Object> mapParam = new HashMap<>();
|
||||
flowableDefineFeignClient.start("flow_yzep99kb:1:c0ff8a75-da73-11ed-829f-b07b253cdad9",thsSupervise.getSupIndex(),mapParam).getData();
|
||||
String proInId ="";
|
||||
if(thsSupervise.getType() == 0){
|
||||
proInId = "flow_yzep99kb:1:a100b48b-da75-11ed-8335-b07b253cdad9";
|
||||
}else {
|
||||
proInId = "flow_yzep99kb:2:6358e099-dcba-11ed-8026-b07b253cdad9";
|
||||
}
|
||||
flowableDefineFeignClient.start(proInId,thsSupervise.getSupIndex(),mapParam);
|
||||
|
||||
for (ThsOverRunLog thsOverRunLog : overRunLogList) {
|
||||
thsOverRunLogMapper.insert(thsOverRunLog);
|
||||
|
||||
@@ -59,12 +59,12 @@ public class FlowDefinitionController extends BaseController {
|
||||
@ApiOperation(value = "工作流_部署流程")
|
||||
public void createDeployment() {
|
||||
Deployment deployment = repositoryService.createDeployment()
|
||||
.addClasspathResource("aa.bpmn20.xml")
|
||||
.name("技术监督预警流程").category("testCategory")
|
||||
.addClasspathResource("gaojing.bpmn20.xml")
|
||||
.name("技术监督告警流程").category("gaojing")
|
||||
.deploy();
|
||||
|
||||
ProcessDefinition definition = repositoryService.createProcessDefinitionQuery().deploymentId(deployment.getId()).singleResult();
|
||||
repositoryService.setProcessDefinitionCategory(definition.getId(), "testCategory");
|
||||
repositoryService.setProcessDefinitionCategory(definition.getId(), "gaojing");
|
||||
System.out.println(deployment.getId());
|
||||
}
|
||||
|
||||
|
||||
@@ -145,7 +145,14 @@ public class ThsSuperviseServiceImpl extends ServiceImpl<ThsSuperviseMapper, Ths
|
||||
this.thsSuperviseMapper.insert(thsSupervise);
|
||||
//TODO 解决工作流写死问题
|
||||
Map<String, Object> mapParam = new HashMap<>();
|
||||
iFlowDefinitionService.startProcessInstanceById("flow_yzep99kb:1:a100b48b-da75-11ed-8335-b07b253cdad9",thsSupervise.getSupIndex(),mapParam);
|
||||
String proInId = "";
|
||||
if(thsSupervise.getType() == 0){
|
||||
proInId = "flow_yzep99kb:1:a100b48b-da75-11ed-8335-b07b253cdad9";
|
||||
}else {
|
||||
proInId = "flow_yzep99kb:2:6358e099-dcba-11ed-8026-b07b253cdad9";
|
||||
}
|
||||
iFlowDefinitionService.startProcessInstanceById(proInId,thsSupervise.getSupIndex(),mapParam);
|
||||
|
||||
|
||||
for (ThsOverRunLog thsOverRunLog : superviceRunLogVo.getOverRunLog()) {
|
||||
thsOverRunLog.setCreateTime(date);
|
||||
|
||||
105
pqs-process/process-boot/src/main/resources/gaojing.bpmn20.xml
Normal file
105
pqs-process/process-boot/src/main/resources/gaojing.bpmn20.xml
Normal file
@@ -0,0 +1,105 @@
|
||||
<?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:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"
|
||||
xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC"
|
||||
xmlns:bioc="http://bpmn.io/schema/bpmn/biocolor/1.0"
|
||||
xmlns:flowable="http://flowable.org/bpmn"
|
||||
xmlns:di="http://www.omg.org/spec/DD/20100524/DI"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.flowable.org/processdef">
|
||||
<process id="flow_yzep99kb" name="flow_pjpqvxgw" flowable:processCategory="null">
|
||||
<startEvent id="start_event" name="告警单流程开始">
|
||||
<outgoing>Flow_1wrqzmd</outgoing>
|
||||
</startEvent>
|
||||
<userTask id="Activity_11eo5gu" name="监督单下发" flowable:userType="assignee" flowable:dataType="dynamic" flowable:assignee="${INITIATOR}">
|
||||
<incoming>Flow_1wrqzmd</incoming>
|
||||
<outgoing>Flow_0q5q2pr</outgoing>
|
||||
</userTask>
|
||||
<sequenceFlow id="Flow_1wrqzmd" name="" sourceRef="start_event" targetRef="Activity_11eo5gu" />
|
||||
<userTask id="Activity_1xjk88s" name="监督反馈单上传" flowable:userType="assignee" flowable:dataType="dynamic" flowable:assignee="${INITIATOR}">
|
||||
<incoming>Flow_0q5q2pr</incoming>
|
||||
<outgoing>Flow_17er5rz</outgoing>
|
||||
</userTask>
|
||||
<sequenceFlow id="Flow_0q5q2pr" name="" sourceRef="Activity_11eo5gu" targetRef="Activity_1xjk88s" />
|
||||
<endEvent id="Event_12lq7e1" name="结束">
|
||||
<incoming>Flow_0nuy3gu</incoming>
|
||||
</endEvent>
|
||||
<sequenceFlow id="Flow_17er5rz" name="" sourceRef="Activity_1xjk88s" targetRef="Activity_04362zn" />
|
||||
<userTask id="Activity_04362zn" name="测试报告上传" flowable:userType="assignee" flowable:dataType="dynamic" flowable:assignee="${INITIATOR}">
|
||||
<incoming>Flow_17er5rz</incoming>
|
||||
<outgoing>Flow_01tmwhj</outgoing>
|
||||
</userTask>
|
||||
<sequenceFlow id="Flow_01tmwhj" name="" sourceRef="Activity_04362zn" targetRef="Activity_093l1yz" />
|
||||
<userTask id="Activity_093l1yz" name="整改单下发" flowable:userType="assignee" flowable:dataType="dynamic" flowable:assignee="${INITIATOR}">
|
||||
<incoming>Flow_01tmwhj</incoming>
|
||||
<outgoing>Flow_1olja2w</outgoing>
|
||||
</userTask>
|
||||
<sequenceFlow id="Flow_1olja2w" sourceRef="Activity_093l1yz" targetRef="Activity_01ltup8" />
|
||||
<userTask id="Activity_01ltup8" name="整改单上传" flowable:userType="assignee" flowable:dataType="dynamic" flowable:assignee="${INITIATOR}">
|
||||
<incoming>Flow_1olja2w</incoming>
|
||||
<outgoing>Flow_0nuy3gu</outgoing>
|
||||
</userTask>
|
||||
<sequenceFlow id="Flow_0nuy3gu" sourceRef="Activity_01ltup8" targetRef="Event_12lq7e1" />
|
||||
</process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_flow">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_flow" bpmnElement="flow_yzep99kb">
|
||||
<bpmndi:BPMNShape id="Event_12lq7e1_di" bpmnElement="Event_12lq7e1">
|
||||
<omgdc:Bounds x="442" y="102" width="36" height="36" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<omgdc:Bounds x="449" y="145" width="23" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="BPMNShape_start_event" bpmnElement="start_event" bioc:stroke="">
|
||||
<omgdc:Bounds x="-335" y="105" width="30" height="30" />
|
||||
<bpmndi:BPMNLabel>
|
||||
<omgdc:Bounds x="-359" y="142" width="78" height="14" />
|
||||
</bpmndi:BPMNLabel>
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_11eo5gu_di" bpmnElement="Activity_11eo5gu">
|
||||
<omgdc:Bounds x="-260" y="80" width="100" height="80" />
|
||||
<bpmndi:BPMNLabel />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1xjk88s_di" bpmnElement="Activity_1xjk88s">
|
||||
<omgdc:Bounds x="-120" y="80" width="100" height="80" />
|
||||
<bpmndi:BPMNLabel />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_04362zn_di" bpmnElement="Activity_04362zn">
|
||||
<omgdc:Bounds x="20" y="80" width="100" height="80" />
|
||||
<bpmndi:BPMNLabel />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_093l1yz_di" bpmnElement="Activity_093l1yz">
|
||||
<omgdc:Bounds x="160" y="80" width="100" height="80" />
|
||||
<bpmndi:BPMNLabel />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_01ltup8_di" bpmnElement="Activity_01ltup8">
|
||||
<omgdc:Bounds x="300" y="80" width="100" height="80" />
|
||||
<bpmndi:BPMNLabel />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_1wrqzmd_di" bpmnElement="Flow_1wrqzmd">
|
||||
<di:waypoint x="-305" y="120" />
|
||||
<di:waypoint x="-260" y="120" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0q5q2pr_di" bpmnElement="Flow_0q5q2pr">
|
||||
<di:waypoint x="-160" y="120" />
|
||||
<di:waypoint x="-120" y="120" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_17er5rz_di" bpmnElement="Flow_17er5rz">
|
||||
<di:waypoint x="-20" y="120" />
|
||||
<di:waypoint x="20" y="120" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_01tmwhj_di" bpmnElement="Flow_01tmwhj">
|
||||
<di:waypoint x="120" y="120" />
|
||||
<di:waypoint x="160" y="120" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_1olja2w_di" bpmnElement="Flow_1olja2w">
|
||||
<di:waypoint x="260" y="120" />
|
||||
<di:waypoint x="300" y="120" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0nuy3gu_di" bpmnElement="Flow_0nuy3gu">
|
||||
<di:waypoint x="400" y="120" />
|
||||
<di:waypoint x="442" y="120" />
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</definitions>
|
||||
Reference in New Issue
Block a user