基于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、相应的效果图

相关内容

热门资讯

透视科技!闲来游戏辅助器脚本,... 透视科技!闲来游戏辅助器脚本,哈糖大菠萝开挂(透视)开挂辅助安装2026新版技巧;无需打开直接搜索加...
实测辅助!wepoker怎么增... 您好:赣牌圈挂安装图解这款游戏可以开挂的,确实是有挂的,很多玩家在这款游戏中打牌都会发现很多用户的牌...
指引辅助"微信老铁1... 大家好,今天小编来为大家解答微信老铁13水辅助这个问题咨询软件客服可以免费测试直接加微信(13670...
第九分钟开挂"约战丹... 第九分钟开挂"约战丹东辅助"原先有开挂辅助透视器(有挂秘笈) 【无需打开直接搜索加薇13670430...
透视中牌率!微乐河南麻将辅助i... 透视中牌率!微乐河南麻将辅助ios,新卡农辅助(透视)开挂辅助安装技巧教程;无需打开直接搜索薇:13...
法子开挂"微信开心是... 大家好,今天小编来为大家解答微信开心是按照辅助脚本这个问题咨询软件客服可以免费测试直接加微信(136...
关于辅助!线上德州的辅助器是什... 关于辅助!线上德州的辅助器是什么,浙江游戏大厅脚本软件,开挂(透视)辅助下载(有挂功能);打开点击测...
一分钟开挂"青龙辅助... 一分钟开挂"青龙辅助3.0"从前有开挂辅助透视脚本(有挂神器)【无需打开直接搜索加薇13670430...
技法辅助"好友赣南插... 技法辅助"好友赣南插件"开挂(安装)辅助插件(真实有挂)《详细加薇136704302咨询》游戏特色:...
透视透视!欢聚水鱼辅助插件,樱... 樱花之盛辅助真的假的是一款可以让一直输的玩家,快速成为一个“必胜”的ai辅助神器,有需要的用户可以加...