feat(流程实例): 新增 流程状态变量参数

This commit is contained in:
konbai
2023-03-13 01:46:21 +08:00
parent b81b48baa7
commit c5a7ecb4f8
6 changed files with 121 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
package com.ruoyi.flowable.config;
import com.ruoyi.flowable.listener.GlobalEventListener;
import lombok.AllArgsConstructor;
import org.flowable.common.engine.api.delegate.event.FlowableEngineEventType;
import org.flowable.engine.RuntimeService;
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 ApplicationListener<ContextRefreshedEvent> {
private final GlobalEventListener globalEventListener;
private final RuntimeService runtimeService;
@Override
public void onApplicationEvent(ContextRefreshedEvent event) {
// 流程正常结束
runtimeService.addEventListener(globalEventListener, FlowableEngineEventType.PROCESS_COMPLETED);
}
}