当前位置: 首页 > news >正文

做网站需要的注意事项郑州便宜网站建设

做网站需要的注意事项,郑州便宜网站建设,logo模板素材,百度游戏风云榜更多ruoyi-nbcio功能请看演示系统 gitee源代码地址 前后端代码: https://gitee.com/nbacheng/ruoyi-nbcio 演示地址:RuoYi-Nbcio后台管理系统 这个章节来完成并行网关与排它条件网关的功能 1、前端 目前就修改了排它条件网关的前端条件部分&#xf…

更多ruoyi-nbcio功能请看演示系统

gitee源代码地址

前后端代码: https://gitee.com/nbacheng/ruoyi-nbcio

演示地址:RuoYi-Nbcio后台管理系统

这个章节来完成并行网关与排它条件网关的功能

1、前端

    目前就修改了排它条件网关的前端条件部分,简化条件公式,考虑与原有流程设计器兼容。

  主要是以下部分修改

 <!-- 条件  --><section class="condition-pane" v-if="value && isConditionNode()"><!-- 字符串条件 --><el-input placeholder="请输入条件表达式" v-model="pconditions"><template slot="prepend">条件表达式:</template></el-input></section>/*** 条件节点确认保存得回调*/conditionNodeComfirm() {this.properties.conditions = this.pconditions// 发起人虽然是条件 但是这里把发起人放到外部单独判断this.properties.initiator = this.initiator['dep&user']//this.initiator['dep&user'] && (nodeContent = `[发起人: ${this.getOrgSelectLabel('condition')}]` + '\n' + nodeContent)this.$emit("confirm", this.properties, this.pconditions || '请设置条件表达式');this.visible = false;},/*** 初始化条件节点数据*/initConditionNodeData(){this.pconditions = this.value.content},

2、排它条件网关后端修改

String createExclusiveGatewayBuilder(String formId, JSONObject flowNode) throws InvocationTargetException, IllegalAccessException {//String name = flowNode.getString("nodeName");String exclusiveGatewayId = id("exclusiveGateway");ExclusiveGateway exclusiveGateway = new ExclusiveGateway();exclusiveGateway.setId(exclusiveGatewayId);exclusiveGateway.setName("排它条件网关");ddProcess.addFlowElement(exclusiveGateway);ddProcess.addFlowElement(connect(formId, exclusiveGatewayId));if (Objects.isNull(flowNode.getJSONArray("conditionNodes")) && Objects.isNull(flowNode.getJSONObject("childNode"))) {return exclusiveGatewayId;}List<JSONObject> flowNodes = Optional.ofNullable(flowNode.getJSONArray("conditionNodes")).map(e -> e.toJavaList(JSONObject.class)).orElse(Collections.emptyList());List<String> incoming = Lists.newArrayListWithCapacity(flowNodes.size());List<JSONObject> conditions = Lists.newCopyOnWriteArrayList();for (JSONObject element : flowNodes) {JSONObject childNode = element.getJSONObject("childNode");JSONObject properties = element.getJSONObject("properties");String nodeName = properties.getString("title");String expression = properties.getString("conditions");if (Objects.isNull(childNode)) {incoming.add(exclusiveGatewayId);JSONObject condition = new JSONObject();condition.fluentPut("nodeName", nodeName).fluentPut("expression", expression);conditions.add(condition);continue;}// 只生成一个任务,同时设置当前任务的条件childNode.put("incoming", Collections.singletonList(exclusiveGatewayId));String identifier = create(exclusiveGatewayId, childNode);List<SequenceFlow> flows = ddSequenceFlows.stream().filter(flow -> StringUtils.equals(exclusiveGatewayId, flow.getSourceRef())).collect(Collectors.toList());flows.stream().forEach(e -> {if (StringUtils.isBlank(e.getName()) && StringUtils.isNotBlank(nodeName)) {e.setName(nodeName);}// 设置条件表达式if (Objects.isNull(e.getConditionExpression()) && StringUtils.isNotBlank(expression)) {e.setConditionExpression(expression);}});if (Objects.nonNull(identifier)) {incoming.add(identifier);}}JSONObject childNode = flowNode.getJSONObject("childNode");if (Objects.nonNull(childNode)) {if (incoming == null || incoming.isEmpty()) {return create(exclusiveGatewayId, childNode);} else {// 所有 service task 连接 end exclusive 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(flowElement.getId(), childNode);for (int i = 1; i < incoming.size(); i++) {ddProcess.addFlowElement(connect(incoming.get(i), identifier));}//  针对 gateway 空任务分支 添加条件表达式if (!conditions.isEmpty()) {FlowElement flowElement1 = ddBpmnModel.getFlowElement(identifier);// 获取从 gateway 到目标节点 未设置条件表达式的节点List<SequenceFlow> flows = ddSequenceFlows.stream().filter(flow -> StringUtils.equals(flowElement1.getId(), flow.getTargetRef())).filter(flow -> StringUtils.equals(flow.getSourceRef(), exclusiveGatewayId)).collect(Collectors.toList());flows.stream().forEach(sequenceFlow -> {if (!conditions.isEmpty()) {JSONObject condition = conditions.get(0);String nodeName = condition.getString("content");String expression = condition.getString("expression");if (StringUtils.isBlank(sequenceFlow.getName()) && StringUtils.isNotBlank(nodeName)) {sequenceFlow.setName(nodeName);}// 设置条件表达式if (Objects.isNull(sequenceFlow.getConditionExpression()) && StringUtils.isNotBlank(expression)) {sequenceFlow.setConditionExpression(expression);}conditions.remove(0);}});}// 1.1 边连接完成后,在进行 nextNode 创建if (Objects.nonNull(nextNode)) {return create(identifier, nextNode);} else {return identifier;}}}return exclusiveGatewayId;}

4、效果图如下:

还是有bug,后面的审批人连接有问题,后续修改吧。

http://www.yayakq.cn/news/641160/

相关文章:

  • 进贤网站建设网站专题制作原则
  • 口碑好的番禺网站建设一般做网站多少钱
  • 贵州省网站集约化建设友情链接模板
  • 廊坊网站建设墨子网站建设人工费
  • 网站怎么用网站用什么软件程序做
  • 做婚庆网站有哪些flash网站的优点和缺点
  • 公司网站被抄袭物业管理系统有哪些模块
  • 做国外直播网站咖啡店网站模板
  • 编辑网站的软件手机软件梧州门户网站
  • 承接php网站建设网站开发的ppt报告
  • 威海临港区建设局网站上海公司营业执照查询
  • 环境没有tomcat怎么演示自己做的网站wordpress标签链接
  • 泰安网站建设优化案例报告广西建设教育协会网站
  • 网站维护的要求成都有什么好玩的吗
  • wordpress网站怎么仿珍岛外贸网站建设
  • 资源网站推广wordpress模板如何
  • 抓取网站访客qq号码wordpress 放大镜插件
  • 中国有没有做的好的网站网站qq微信分享怎么做的
  • 免费做试卷的网站或试卷苏州网站建设的公司
  • 教育网站建设的必要性网站实名认证 备案
  • 中国拟在建项目网包头网站优化
  • 怎么做影视类网站域名注册后如何建网站
  • 建设厅资质管理网站河北省建筑人才网
  • 网站死链对网站影响网站标签名词
  • 自己做网站怎么跳过备案子网站建设
  • 营销型网站要多少钱如何申请商业服务器
  • 网站建设知识学习心得长沙做网站kaodezhu
  • 高性能网站建设进阶指南 pdfui培训周记
  • 网站建设合作流程搜狗站长推送工具
  • 场外期权网站开发广东东莞旅游必去十大景点