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.flowable.engine.delegate.JavaDelegate;
6 import org.springframework.stereotype.Component;
7
8 /**
9  * 类型为 delegateExpression 的 ExecutionListener 监听器示例
10  *
11  * 和 {@link DemoDelegateClassExecutionListener} 的差异是,需要注册到 Spring 中
12  */
13 @Component
14 @Slf4j
15 public class DemoDelegateExpressionExecutionListener implements JavaDelegate {
16
17     @Override
18     public void execute(DelegateExecution execution) {
19         log.info("[execute][execution({}) 被调用!变量有:{}]", execution.getId(),
20                 execution.getCurrentFlowableListener().getFieldExtensions());
21     }
22
23 }