提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.bpm.framework.flowable.core.listener.demo.task; |
H |
2 |
|
|
3 |
import lombok.extern.slf4j.Slf4j; |
|
4 |
import org.flowable.engine.delegate.TaskListener; |
|
5 |
import org.flowable.task.service.delegate.DelegateTask; |
|
6 |
import org.springframework.stereotype.Component; |
|
7 |
|
49b4b6
|
8 |
import java.util.Map; |
H |
9 |
|
e7c126
|
10 |
/** |
H |
11 |
* 类型为 delegateExpression 的 TaskListener 监听器示例 |
|
12 |
* |
|
13 |
* @author iailab |
|
14 |
*/ |
|
15 |
@Component |
|
16 |
@Slf4j |
|
17 |
public class DemoDelegateExpressionTaskListener implements TaskListener { |
|
18 |
|
|
19 |
@Override |
|
20 |
public void notify(DelegateTask delegateTask) { |
49b4b6
|
21 |
log.info("[execute][task({}) 任务监听器(委托表达式)被调用]", delegateTask.getId()); |
H |
22 |
Map<String, Object> variables = delegateTask.getVariables(); |
|
23 |
System.out.println(variables.toString());; |
e7c126
|
24 |
} |
H |
25 |
|
|
26 |
} |