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

石家庄网站建设团队v电影主题 wordpress

石家庄网站建设团队,v电影主题 wordpress,查企业app,设计方案文本更多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.dnsts.com.cn/news/61529.html

相关文章:

  • ii6创建网站如何做网站引流
  • 一个好的网站有什么标准wordpress重置query循环
  • 做复印机的模板网站网上购物软件
  • 手机网站制作流程图wordpress div layer
  • 如何做logo模板下载网站网站建设流程有哪七步
  • 淘宝网站内搜索引擎优化怎么做个人免费建网站
  • 简约大气网站网站如何添加百度地图
  • 开远市住房和城乡建设局网站杭州网站seo公司
  • 山东浩景建设有限公司网站百度网站建设前期都有哪些费用
  • app网站建设哪家好wordpress生成缩略图
  • 上海有哪些做网站响应 网站建设
  • 泉州哪个公司网站做的好网站备案申请模板
  • 玉林市网站开发公司两学一做网站专栏
  • 网站建设的方法有哪些内容张雪峰谈电子商务
  • 端掉一个wordpress网站抖音代运营排名
  • wordpress多语言建站网站 做英文 翻译 规则
  • 做网站标准步骤临沂seo网站管理
  • 龙华附近网站建设安卓手机app下载
  • 检察院门户网站建设自查自纠报告网站建设具体详细过程
  • 南阳网站运营深圳网站建设 宝华大厦
  • 山西省建设信息网站计算机专业网站设计论文
  • 高薪聘请网站开发工程师学习网站开发
  • 免费优化网站的软件做导购网站
  • 帝国cms 网站地图电子商务网站建设自建团队
  • 网站导航为什么用ul列表做公司做网站是管理费用
  • 带管理后台的网站网站登录模版
  • 网站图片切换初学者怎么制作平面图
  • 购物网站首页图片wordpress cdn登录
  • 网站开发文档模板下载google推广方式和手段有哪些
  • 郑州做网站价格公司没有网站如何做外贸