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

企业网站规划方案网站是做排行榜

企业网站规划方案,网站是做排行榜,360优化大师官方网站,徐汇网站制作更多ruoyi-nbcio功能请看演示系统 gitee源代码地址 前后端代码#xff1a; https://gitee.com/nbacheng/ruoyi-nbcio 演示地址#xff1a;RuoYi-Nbcio后台管理系统 上一节说到待办系统的监听器TaskCreateListener#xff0c;需要在flowable全局监听配置里加入配置 1、Glo… 更多ruoyi-nbcio功能请看演示系统 gitee源代码地址 前后端代码 https://gitee.com/nbacheng/ruoyi-nbcio 演示地址RuoYi-Nbcio后台管理系统 上一节说到待办系统的监听器TaskCreateListener需要在flowable全局监听配置里加入配置 1、GlobalEventListenerConfig.java文件如下 package com.ruoyi.flowable.config;import com.ruoyi.flowable.listener.GlobalEventListener; import com.ruoyi.flowable.listener.ProcessCompleteListener; import com.ruoyi.flowable.listener.TaskCreateListener;import lombok.AllArgsConstructor; import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType; import org.flowable.common.engine.api.delegate.event.FlowableEventDispatcher; import org.flowable.engine.RuntimeService; import org.flowable.spring.SpringProcessEngineConfiguration; import org.springframework.context.ApplicationListener; import org.springframework.context.annotation.Configuration; import org.springframework.context.event.ContextRefreshedEvent;/*** flowable全局监听配置** author ssc*/ Configuration AllArgsConstructor public class GlobalEventListenerConfig implements ApplicationListenerContextRefreshedEvent {private final GlobalEventListener globalEventListener;private final RuntimeService runtimeService;private final SpringProcessEngineConfiguration configuration;private final TaskCreateListener taskCreateListener;private final ProcessCompleteListener processCompleteListener;Overridepublic void onApplicationEvent(ContextRefreshedEvent event) {FlowableEventDispatcher dispatcher configuration.getEventDispatcher();// 任务创建全局监听-待办消息发送dispatcher.addEventListener(taskCreateListener, FlowableEngineEventType.TASK_CREATED, FlowableEngineEventType.TASK_ASSIGNED);//任务创建全局监听-完成消息发送dispatcher.addEventListener(processCompleteListener, FlowableEngineEventType.PROCESS_COMPLETED);// 流程正常结束runtimeService.addEventListener(globalEventListener, FlowableEngineEventType.PROCESS_COMPLETED);} } 2、还增加了一个流程结束的通知监听如下 package com.ruoyi.flowable.listener;import java.util.List;import javax.annotation.Resource;import org.apache.commons.lang3.StringUtils; import org.flowable.common.engine.api.delegate.event.FlowableEngineEntityEvent; import org.flowable.common.engine.api.delegate.event.FlowableEvent; import org.flowable.engine.HistoryService; import org.flowable.engine.RepositoryService; import org.flowable.engine.TaskService; import org.flowable.engine.delegate.event.AbstractFlowableEngineEventListener; import org.flowable.engine.history.HistoricProcessInstance; import org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl; import org.flowable.task.api.Task; import org.flowable.variable.api.persistence.entity.VariableInstance; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component;import com.ruoyi.common.core.service.CommonService; import com.ruoyi.common.constant.Constants; import com.ruoyi.common.core.domain.model.LoginUser;import lombok.RequiredArgsConstructor;/*** 全局监听-工作流完成消息提醒** author nbacheng*///必须要用 AbstractFlowableEngineEventListener 用FlowableEventListener这个会出现问题应该是已经完成了 Component RequiredArgsConstructor public class ProcessCompleteListener extends AbstractFlowableEngineEventListener {private final TaskService taskService;Resourceprivate CommonService commonService;Autowiredprotected HistoryService historyService;Resourceprotected RepositoryService repositoryService;Overrideprotected void processCompleted(FlowableEngineEntityEvent event) {System.out.println(进入流程结束监听器……);String procInsId event.getProcessInstanceId();HistoricProcessInstance hi historyService.createHistoricProcessInstanceQuery().processInstanceId(procInsId).singleResult();ListTask listtask taskService.createTaskQuery().processInstanceId(procInsId).active().list();String taskId ;if(listtask !null) {taskId listtask.get(0).getId();}String startUserId hi.getStartUserId();String businessKey hi.getBusinessKey();String deployId hi.getDeploymentId();String category ;if (StringUtils.isNotEmpty(startUserId)) {// TODO: 发送提醒消息if(((ExecutionEntityImpl)event.getEntity()).getVariableInstances().get(category) !null) {category ((VariableInstance)((ExecutionEntityImpl)event.getEntity()).getVariableInstances().get(category)).getTextValue();}LoginUser loginUser commonService.getLoginUser();String taskMessageUrl;if(StringUtils.isNotBlank(businessKey)) {taskMessageUrl a href commonService.getBaseUrl() ?procInsId procInsId deployId deployId taskId taskId businessKey businessKey category category finishedfalse 点击这个进行查看/a ;}else {taskMessageUrl a href commonService.getBaseUrl() ?procInsId procInsId deployId deployId taskId taskId businessKey category category finishedfalse 点击这个进行查看/a ;}String msgContent 流程任务结束通知 taskMessageUrl; commonService.sendSysNotice(loginUser.getUsername(), startUserId, 流程任务结束通知, msgContent, Constants.MSG_CATEGORY_1);//setMsgCategory1是通知}super.processCompleted(event);}Overrideprotected void taskCompleted(FlowableEngineEntityEvent event) {System.out.println(进入taskCompleted监听器……);super.taskCompleted(event);}Overridepublic void onEvent(FlowableEvent flowableEvent) {System.out.println(进入taskCompleted监听器--onEvent……);super.onEvent(flowableEvent);} } 当然这两个监听还需要根据实际进行个性化定制与修改。
http://www.w-s-a.com/news/19740/

相关文章:

  • 万维网网站个人申请网站
  • 我想做网站怎么做昆山网站建设 全是乱码
  • 单位做网站怎么做圣诞树html网页代码
  • 网页开发与网站开发企业网站托管服务常用指南
  • 一站式服务图片临沂做进销存网站
  • 鸣蝉智能建站标准物质网站建设模板
  • 电商网站建设技术员的工作职责商业网站制作价格
  • 网站html模板免费下载公司的网站建设费用入什么科目
  • 高中生做网站网页网页制作教程零基础学会
  • 做金融网站有哪些要求WordPress站内搜索代码
  • 济南网站怎么做seowordpress注册发邮件
  • 珠海网站设计平台东莞市手机网站建设平台
  • 网站开发文档合同怎么在wordpress导航条下方加入文字广告链接
  • 网站建设需怎么做有网站怎么做企业邮箱
  • 网站制作流程视频教程小程序多少钱一年
  • 暗网是什么网站花都网站建设哪家好
  • 贵州网站开发流程晋江论坛手机版
  • 网站建设丿金手指谷哥14阿里巴巴官网电脑版
  • 网站开发招聘信息匿名ip访问网站受限
  • 网站转app工具网站规划建设与管理维护大作业
  • flash是怎么做网站的.net购物网站开发
  • 烟台网站建设求职简历品质商城网站建设
  • 做百度外链哪些网站权重高点做网站具备的条件
  • 怎么样用ppt做网站红番茄 网站点评
  • 建设银行河北分行招聘网站哪里能找到网站
  • 兰州营销型网站网站建设收费标准
  • 网站首页动图怎么做自己做网站很难
  • 自建网站如何盈利推广引流最快的方法
  • 网页设计网站结构图怎么弄网站用户 分析
  • 企业手机网站建设策划天津网页设计工作