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

相关内容

热门资讯

来一盘!大众互娱辅助器(透明挂... 来一盘!大众互娱辅助器(透明挂)外挂透明挂辅助app(2024已更新)(哔哩哔哩)1、玩家可以在大众...
玩家必看科普!闽南旺旺麻将(好... 玩家必看科普!闽南旺旺麻将(好像真的是有挂)详细辅助挂教程1、上手简单,内置详细流程视频教学,新手小...
9分钟了解!开心泉州麻将挂是真... 9分钟了解!开心泉州麻将挂是真的吗,雀友游戏一贯有挂,曝光教程(有挂方法);1、9分钟了解!开心泉州...
七分钟详情!优乐麻将有没有挂,... 七分钟详情!优乐麻将有没有挂,越乡游双扣辅助工具(果然有辅助挂)1、该软件可以轻松地帮助玩家将越乡游...
一分钟了解!!广东雀神智能辅助... 一分钟了解!!广东雀神智能辅助器下载(透视)外挂透明挂辅助挂(2023已更新)(哔哩哔哩)1、每一步...
玩家实测!老友汇软件神器(一贯... 玩家实测!老友汇软件神器(一贯有挂)详细透视辅助教程老友汇软件神器是一种具有地方特色的麻将游戏,要想...
8分钟辅助!星悦麻将有挂吗20... 8分钟辅助!星悦麻将有挂吗2020,开心十三张辅助挂本来真的是有挂,黑科技教程(有挂攻略)星悦麻将有...
5分钟黑科技!闲来麻将,天天福... 5分钟黑科技!闲来麻将,天天福建十三张吗(果然有挂)1.天天福建十三张吗 ai辅助创建新账号,点击进...
总算了解!!微信跑得快辅助神器... 总算了解!!微信跑得快辅助神器(透明挂)外挂透明挂辅助软件(2020已更新)(哔哩哔哩);1、在微信...
揭秘!白金岛跑得快外 挂(确实... 揭秘!白金岛跑得快外 挂(确实真的有挂)详细透视教程;1、任何白金岛跑得快外 挂ai辅助神器的玩家都...