add - 新增用于调整工作流默认引擎配置
This commit is contained in:
parent
f44762e338
commit
af30f1810a
@ -0,0 +1,34 @@
|
||||
package cn.axzo.workflow.core.conf;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import org.flowable.common.engine.api.delegate.event.AbstractFlowableEventListener;
|
||||
import org.flowable.common.engine.api.delegate.event.FlowableEvent;
|
||||
import org.flowable.spring.SpringProcessEngineConfiguration;
|
||||
import org.flowable.spring.boot.EngineConfigurationConfigurer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*
|
||||
* @author wangli
|
||||
* @sine 2023/7/11 23:50
|
||||
*/
|
||||
@Component
|
||||
public class CustomEngineConfigurationConfigurer implements EngineConfigurationConfigurer<SpringProcessEngineConfiguration> {
|
||||
private final static Logger log = LoggerFactory.getLogger(CustomEngineConfigurationConfigurer.class);
|
||||
|
||||
@Override
|
||||
public void configure(SpringProcessEngineConfiguration engineConfiguration) {
|
||||
engineConfiguration.setEventListeners(Collections.singletonList(new AbstractFlowableEventListener() {
|
||||
@Override
|
||||
public void onEvent(FlowableEvent event) {
|
||||
log.info("可以处理所有类型事件 onEvent: {}", JSON.toJSONString(event));
|
||||
}
|
||||
|
||||
}));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user