diff --git a/ruoyi-common/ruoyi-common-flowable/src/main/java/org/dromara/common/flowable/listener/UserTaskListener.java b/ruoyi-common/ruoyi-common-flowable/src/main/java/org/dromara/common/flowable/listener/UserTaskListener.java index 8ff7dcb5e1f1a28f2a6c2641c816848341ec9b1a..560d4ead5c225c3e37ee68158c0bda32890b2ef0 100644 --- a/ruoyi-common/ruoyi-common-flowable/src/main/java/org/dromara/common/flowable/listener/UserTaskListener.java +++ b/ruoyi-common/ruoyi-common-flowable/src/main/java/org/dromara/common/flowable/listener/UserTaskListener.java @@ -1,5 +1,8 @@ package org.dromara.common.flowable.listener; +import lombok.Getter; +import lombok.Setter; +import lombok.extern.slf4j.Slf4j; import org.flowable.engine.delegate.TaskListener; import org.flowable.task.service.delegate.DelegateTask; import org.springframework.stereotype.Component; @@ -11,17 +14,21 @@ import org.springframework.stereotype.Component; * @since 2023/5/13 */ @Component(value = "userTaskListener") +@Slf4j public class UserTaskListener implements TaskListener { /** * 注入字段(名称与流程设计时字段名称一致) */ - // private FixedValue field; + @Setter + @Getter + private FixedValue field; @Override public void notify(DelegateTask delegateTask) { //TODO 实现你的任务监听器逻辑 - System.out.println("执行任务监听器..."); + log.info("执行任务监听器..."); + log.info("注入字段field:{}", field.getValue(delegateTask)); } }