基于jeecgboot-vue3的Flowable流程仿钉钉流程设计器-发送信息服务处理
创始人
2024-12-16 13:35:23
0

因为这个项目license问题无法开源,更多技术支持与服务请加入我的知识星球。

1、因为仿钉钉设计器里发送消息处理是一个服务任务,所以要根据这个服务任务进行处理

2、这里目前只对消息进行处理,就是用websocket的发送方式

输入相应的内容,这里也用扩展属性来处理

3、相应的后端代码如下:

public class NotifyNode extends AssigneeNode {     private List types;     private String subject;     private String content;      @Override     public List convert() {         ArrayList elements = new ArrayList<>();         // 服务节点         ServiceTask serviceTask = new ServiceTask();         serviceTask.setId(this.getId());         serviceTask.setName(this.getName());         serviceTask.setAsynchronous(false);         serviceTask.setImplementationType(ImplementationType.IMPLEMENTATION_TYPE_CLASS);         serviceTask.setImplementation("org.jeecg.modules.flowable.ServiceTask.notifyDelegate");         //增加扩展属性 add by nbacheng         Map> extensionElements = new HashMap>();         ExtensionElement extensionElementTotal = new ExtensionElement();         extensionElementTotal.setName("flowable:properties");                   ExtensionElement eElementUser = new ExtensionElement();         eElementUser.setName("flowable:property");         ExtensionAttribute eAttributeUserName = new ExtensionAttribute();         eAttributeUserName.setName("name");         eAttributeUserName.setValue("notifyUserList");         eElementUser.addAttribute(eAttributeUserName);         ExtensionAttribute eAttributeUserValue = new ExtensionAttribute();         eAttributeUserValue.setName("value");         eAttributeUserValue.setValue(StringUtils.join(this.getUsers(), ","));         eElementUser.addAttribute(eAttributeUserValue);         extensionElementTotal.addChildElement(eElementUser);                  ExtensionElement eElementSubject = new ExtensionElement();         eElementSubject.setName("flowable:property");         ExtensionAttribute eAttributeSubjectName = new ExtensionAttribute();         eAttributeSubjectName.setName("name");         eAttributeSubjectName.setValue("subject");         eElementSubject.addAttribute(eAttributeSubjectName);         ExtensionAttribute eAttributeSubjectValue = new ExtensionAttribute();         eAttributeSubjectValue.setName("value");         eAttributeSubjectValue.setValue(this.getSubject());         eElementSubject.addAttribute(eAttributeSubjectValue);         extensionElementTotal.addChildElement(eElementSubject);                  ExtensionElement eElementContent = new ExtensionElement();         eElementContent.setName("flowable:property");         ExtensionAttribute eAttributeContent = new ExtensionAttribute();         eAttributeContent.setName("name");         eAttributeContent.setValue("content");         eElementContent.addAttribute(eAttributeContent);         ExtensionAttribute eAttributeContentValue = new ExtensionAttribute();         eAttributeContentValue.setName("value");         eAttributeContentValue.setValue(this.getContent());         eElementContent.addAttribute(eAttributeContentValue);         extensionElementTotal.addChildElement(eElementContent);                  extensionElements.put("notifyUserList", CollUtil.newArrayList(extensionElementTotal));         serviceTask.setExtensionElements(extensionElements);         elements.add(serviceTask);         // 下一个节点的连线         Node child = this.getChild();         SequenceFlow sequenceFlow = this.buildSequence(child);         elements.add(sequenceFlow);         // 下一个节点         if (Objects.nonNull(child)) {             child.setBranchId(this.getBranchId());             List flowElements = child.convert();             elements.addAll(flowElements);         }         return elements;     } } 

4、相应的效果图

相关内容

热门资讯

六分钟了解!神途免费辅助软件!... 六分钟了解!神途免费辅助软件!切实是有辅助方法(有挂助手)-哔哩哔哩1、神途免费辅助软件公共底牌简单...
七分钟了解!火神微信辅助!都是... 七分钟了解!火神微信辅助!都是是有辅助脚本(有挂细节)-哔哩哔哩1)火神微信辅助有没有挂:进一步探索...
7分钟了解!衢州都莱辅助器是真... 7分钟了解!衢州都莱辅助器是真是假!一贯存在有辅助方法(了解有挂)-哔哩哔哩进入游戏-大厅左侧-新手...
八分钟了解!玄龙辅助下载!竟然... 八分钟了解!玄龙辅助下载!竟然有辅助攻略(确实有挂)-哔哩哔哩运玄龙辅助下载辅助工具,进入游戏界面。...
十分钟了解!科乐天天踢起手好牌... 十分钟了解!科乐天天踢起手好牌!总是存在有辅助方法(确实有挂)-哔哩哔哩1、游戏颠覆性的策略玩法,独...
第一分钟了解!决战加血辅助!一... 第一分钟了解!决战加血辅助!一贯真的有辅助插件(有挂透视)-哔哩哔哩1、决战加血辅助透视辅助软件激活...
两分钟了解!欢聚水鱼科技辅助下... 两分钟了解!欢聚水鱼科技辅助下载!果然一直都是有辅助神器(有挂秘诀)-哔哩哔哩1、让任何用户在无需欢...
4分钟了解!微信小程序雀神挂件... 4分钟了解!微信小程序雀神挂件!真是真的有辅助插件(真的有挂)-哔哩哔哩1、完成微信小程序雀神挂件有...
两分钟了解!新上游通用挂是真的... 两分钟了解!新上游通用挂是真的吗!本来真的有辅助教程(有挂透视)-哔哩哔哩所有人都在同一条线上,像星...
四分钟了解!德州局脚本!一贯真... 四分钟了解!德州局脚本!一贯真的是有辅助神器(有挂细节)-哔哩哔哩1、上手简单,内置详细流程视频教学...