石家庄建站外贸网站,基于php的电商网站开发,wordpress 标签显示图片,棋牌类网站怎么做更多ruoyi-nbcio功能请看演示系统
gitee源代码地址
前后端代码#xff1a; https://gitee.com/nbacheng/ruoyi-nbcio
演示地址#xff1a;RuoYi-Nbcio后台管理系统
这个章节来完成并行网关#xff0c;前端无需修改#xff0c;直接后端修改就可以了。
1、并行网关后端修…
更多ruoyi-nbcio功能请看演示系统
gitee源代码地址
前后端代码 https://gitee.com/nbacheng/ruoyi-nbcio
演示地址RuoYi-Nbcio后台管理系统
这个章节来完成并行网关前端无需修改直接后端修改就可以了。
1、并行网关后端修改如下 String createConcurrentGatewayBuilder(String formId, JSONObject flowNode) throws InvocationTargetException, IllegalAccessException {//String name flowNode.getString(nodeName);ParallelGateway parallelGateway new ParallelGateway();String parallelGatewayId id(parallelGateway);parallelGateway.setId(parallelGatewayId);parallelGateway.setName(并行网关);ddProcess.addFlowElement(parallelGateway);ddProcess.addFlowElement(connect(formId, parallelGatewayId));if (Objects.isNull(flowNode.getJSONArray(concurrentNodes)) Objects.isNull(flowNode.getJSONObject(childNode))) {return parallelGatewayId;}ListJSONObject flowNodes Optional.ofNullable(flowNode.getJSONArray(concurrentNodes)).map(e - e.toJavaList(JSONObject.class)).orElse(Collections.emptyList());ListString incoming Lists.newArrayListWithCapacity(flowNodes.size());for (JSONObject element : flowNodes) {JSONObject childNode element.getJSONObject(childNode);if (Objects.isNull(childNode)) {incoming.add(parallelGatewayId);continue;}String identifier create(parallelGatewayId, childNode);if (Objects.nonNull(identifier)) {incoming.add(identifier);}}JSONObject childNode flowNode.getJSONObject(childNode);if (Objects.nonNull(childNode)) {// 普通结束网关if (CollectionUtils.isEmpty(incoming)) {return create(parallelGatewayId, childNode);} else {// 所有 service task 连接 end parallel gatewaychildNode.put(incoming, incoming);FlowElement flowElement ddBpmnModel.getFlowElement(incoming.get(0));// 1.0 先进行边连接, 暂存 nextNodeJSONObject nextNode childNode.getJSONObject(childNode);childNode.put(childNode, null);String identifier create(incoming.get(0), childNode);for (int i 1; i incoming.size(); i) {FlowElement flowElement1 ddBpmnModel.getFlowElement(incoming.get(i));ddProcess.addFlowElement(connect(flowElement1.getId(), identifier));}// 1.1 边连接完成后在进行 nextNode 创建if (Objects.nonNull(nextNode)) {return create(identifier, nextNode);} else {return identifier;}}}return parallelGatewayId;}
2、效果图如下 3、生产的xml如下
?xml version1.0 encodingUTF-8?
definitions xmlnshttp://www.omg.org/spec/BPMN/20100524/MODEL xmlns:xsihttp://www.w3.org/2001/XMLSchema-instance xmlns:xsdhttp://www.w3.org/2001/XMLSchema xmlns:flowablehttp://flowable.org/bpmn xmlns:bpmndihttp://www.omg.org/spec/BPMN/20100524/DI xmlns:omgdchttp://www.omg.org/spec/DD/20100524/DC xmlns:omgdihttp://www.omg.org/spec/DD/20100524/DI typeLanguagehttp://www.w3.org/2001/XMLSchema expressionLanguagehttp://www.w3.org/1999/XPath targetNamespacehttp://www.flowable.org/testprocess idProcess_1233c789-c986-4de2-8ab2-9c24ef0a2312 namedingding演示流程 isExecutabletruestartEvent idstart_36faea0bc7344384bc52078dd43c0829/startEventparallelGateway idparallelGateway_31fb5c2d6062402688b9bceb230610df name并行网关/parallelGatewaysequenceFlow idsequenceFlow_8f3fb2e6498847aea4e88ad7f8527720 sourceRefstart_36faea0bc7344384bc52078dd43c0829 targetRefparallelGateway_31fb5c2d6062402688b9bceb230610df/sequenceFlowuserTask iduserTask_261260b7d3c643f08d6000f422628363 name审批人 flowable:assigneery flowable:dataTypeUSERS flowable:text若依/userTasksequenceFlow idsequenceFlow_ec473d524b1f4c70ac8d59c9d11cf20a sourceRefparallelGateway_31fb5c2d6062402688b9bceb230610df targetRefuserTask_261260b7d3c643f08d6000f422628363/sequenceFlowuserTask iduserTask_182b04b3cc0c465589ae5bb936185fe5 name审批人 flowable:assigneezhangsan flowable:dataTypeUSERS flowable:text张三/userTasksequenceFlow idsequenceFlow_9c0f2e6f0a434217996502850297b251 sourceRefparallelGateway_31fb5c2d6062402688b9bceb230610df targetRefuserTask_182b04b3cc0c465589ae5bb936185fe5/sequenceFlowuserTask iduserTask_d81ef1ca0fa2436abf543dc6cb7d80df name审批人 flowable:assigneeadmin flowable:dataTypeUSERS flowable:text若依管理员/userTasksequenceFlow idsequenceFlow_2227bd432d044dc889aa9a9132ca7589 sourceRefuserTask_261260b7d3c643f08d6000f422628363 targetRefuserTask_d81ef1ca0fa2436abf543dc6cb7d80df/sequenceFlowsequenceFlow idsequenceFlow_8bb051d48a654b3bba4a687c6320eb29 sourceRefuserTask_182b04b3cc0c465589ae5bb936185fe5 targetRefuserTask_d81ef1ca0fa2436abf543dc6cb7d80df/sequenceFlowendEvent idend_28c4b21fe4d145cfb6aa1019d13a24ac/endEventsequenceFlow idsequenceFlow_008d4f7e2c0e4246af7d5c4092af6a21 sourceRefuserTask_d81ef1ca0fa2436abf543dc6cb7d80df targetRefend_28c4b21fe4d145cfb6aa1019d13a24ac/sequenceFlow/processbpmndi:BPMNDiagram idBPMNDiagram_Process_1233c789-c986-4de2-8ab2-9c24ef0a2312bpmndi:BPMNPlane bpmnElementProcess_1233c789-c986-4de2-8ab2-9c24ef0a2312 idBPMNPlane_Process_1233c789-c986-4de2-8ab2-9c24ef0a2312bpmndi:BPMNShape bpmnElementstart_36faea0bc7344384bc52078dd43c0829 idBPMNShape_start_36faea0bc7344384bc52078dd43c0829omgdc:Bounds height30.0 width30.0 x0.0 y95.0/omgdc:Bounds/bpmndi:BPMNShapebpmndi:BPMNShape bpmnElementuserTask_d81ef1ca0fa2436abf543dc6cb7d80df idBPMNShape_userTask_d81ef1ca0fa2436abf543dc6cb7d80dfomgdc:Bounds height60.0 width100.0 x320.0 y80.0/omgdc:Bounds/bpmndi:BPMNShapebpmndi:BPMNShape bpmnElementuserTask_182b04b3cc0c465589ae5bb936185fe5 idBPMNShape_userTask_182b04b3cc0c465589ae5bb936185fe5omgdc:Bounds height60.0 width100.0 x170.0 y160.0/omgdc:Bounds/bpmndi:BPMNShapebpmndi:BPMNShape bpmnElementparallelGateway_31fb5c2d6062402688b9bceb230610df idBPMNShape_parallelGateway_31fb5c2d6062402688b9bceb230610dfomgdc:Bounds height40.0 width40.0 x80.0 y90.0/omgdc:Bounds/bpmndi:BPMNShapebpmndi:BPMNShape bpmnElementuserTask_261260b7d3c643f08d6000f422628363 idBPMNShape_userTask_261260b7d3c643f08d6000f422628363omgdc:Bounds height60.0 width100.0 x170.0 y0.0/omgdc:Bounds/bpmndi:BPMNShapebpmndi:BPMNShape bpmnElementend_28c4b21fe4d145cfb6aa1019d13a24ac idBPMNShape_end_28c4b21fe4d145cfb6aa1019d13a24acomgdc:Bounds height30.0 width30.0 x470.0 y95.0/omgdc:Bounds/bpmndi:BPMNShapebpmndi:BPMNEdge bpmnElementsequenceFlow_8bb051d48a654b3bba4a687c6320eb29 idBPMNEdge_sequenceFlow_8bb051d48a654b3bba4a687c6320eb29omgdi:waypoint x270.0 y190.0/omgdi:waypointomgdi:waypoint x282.0 y190.0/omgdi:waypointomgdi:waypoint x282.0 y110.0/omgdi:waypointomgdi:waypoint x320.0 y110.0/omgdi:waypoint/bpmndi:BPMNEdgebpmndi:BPMNEdge bpmnElementsequenceFlow_8f3fb2e6498847aea4e88ad7f8527720 idBPMNEdge_sequenceFlow_8f3fb2e6498847aea4e88ad7f8527720omgdi:waypoint x30.0 y110.0/omgdi:waypointomgdi:waypoint x80.0 y110.0/omgdi:waypoint/bpmndi:BPMNEdgebpmndi:BPMNEdge bpmnElementsequenceFlow_ec473d524b1f4c70ac8d59c9d11cf20a idBPMNEdge_sequenceFlow_ec473d524b1f4c70ac8d59c9d11cf20aomgdi:waypoint x120.0 y102.5/omgdi:waypointomgdi:waypoint x132.0 y102.5/omgdi:waypointomgdi:waypoint x132.0 y30.000000000000007/omgdi:waypointomgdi:waypoint x170.0 y30.000000000000007/omgdi:waypoint/bpmndi:BPMNEdgebpmndi:BPMNEdge bpmnElementsequenceFlow_9c0f2e6f0a434217996502850297b251 idBPMNEdge_sequenceFlow_9c0f2e6f0a434217996502850297b251omgdi:waypoint x120.0 y117.5/omgdi:waypointomgdi:waypoint x132.0 y117.5/omgdi:waypointomgdi:waypoint x132.0 y190.0/omgdi:waypointomgdi:waypoint x170.0 y190.0/omgdi:waypoint/bpmndi:BPMNEdgebpmndi:BPMNEdge bpmnElementsequenceFlow_008d4f7e2c0e4246af7d5c4092af6a21 idBPMNEdge_sequenceFlow_008d4f7e2c0e4246af7d5c4092af6a21omgdi:waypoint x420.0 y110.0/omgdi:waypointomgdi:waypoint x470.0 y110.0/omgdi:waypoint/bpmndi:BPMNEdgebpmndi:BPMNEdge bpmnElementsequenceFlow_2227bd432d044dc889aa9a9132ca7589 idBPMNEdge_sequenceFlow_2227bd432d044dc889aa9a9132ca7589omgdi:waypoint x270.0 y30.0/omgdi:waypointomgdi:waypoint x282.0 y30.0/omgdi:waypointomgdi:waypoint x282.0 y110.0/omgdi:waypointomgdi:waypoint x320.0 y110.0/omgdi:waypoint/bpmndi:BPMNEdge/bpmndi:BPMNPlane/bpmndi:BPMNDiagram
/definitions
4、在原来流程设计器打开如下