feat(流程实例): 新增 流程状态变量参数
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user