houzhongjian
2024-12-03 874287a4c02d0a980d8b97c4a691b4f37ec5e812
提交 | 用户 | 时间
e7c126 1 package com.iailab.module.bpm.framework.flowable.core.listener.demo.exection;
H 2
3 import lombok.extern.slf4j.Slf4j;
4 import org.flowable.engine.delegate.DelegateExecution;
5 import org.springframework.stereotype.Component;
6
7 /**
8  * 类型为 expression 的 ExecutionListener 监听器示例
9  *
10  * 和 {@link DemoDelegateClassExecutionListener} 的差异是,需要注册到 Spring 中,但不用实现 {@link org.flowable.engine.delegate.JavaDelegate} 接口
11  */
12 @Component
13 @Slf4j
14 public class DemoSpringExpressionExecutionListener {
15
16     public void execute(DelegateExecution execution) {
17         log.info("[execute][execution({}) 被调用!变量有:{}]", execution.getId(),
18                 execution.getCurrentFlowableListener().getFieldExtensions());
19     }
20
21 }