From 49b4b614aacd0c3707a94820c264989a91c66edb Mon Sep 17 00:00:00 2001
From: houzhongjian <houzhongyi@126.com>
Date: 星期二, 24 十二月 2024 11:12:10 +0800
Subject: [PATCH] 修改日志路径

---
 iailab-module-bpm/iailab-module-bpm-biz/src/main/java/com/iailab/module/bpm/framework/flowable/core/listener/demo/exection/DemoDelegateExpressionExecutionListener.java |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/iailab-module-bpm/iailab-module-bpm-biz/src/main/java/com/iailab/module/bpm/framework/flowable/core/listener/demo/exection/DemoDelegateExpressionExecutionListener.java b/iailab-module-bpm/iailab-module-bpm-biz/src/main/java/com/iailab/module/bpm/framework/flowable/core/listener/demo/exection/DemoDelegateExpressionExecutionListener.java
index 9836a6d..833e23e 100644
--- a/iailab-module-bpm/iailab-module-bpm-biz/src/main/java/com/iailab/module/bpm/framework/flowable/core/listener/demo/exection/DemoDelegateExpressionExecutionListener.java
+++ b/iailab-module-bpm/iailab-module-bpm-biz/src/main/java/com/iailab/module/bpm/framework/flowable/core/listener/demo/exection/DemoDelegateExpressionExecutionListener.java
@@ -1,9 +1,13 @@
 package com.iailab.module.bpm.framework.flowable.core.listener.demo.exection;
 
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.ObjectUtils;
+import org.flowable.bpmn.model.FieldExtension;
 import org.flowable.engine.delegate.DelegateExecution;
 import org.flowable.engine.delegate.JavaDelegate;
 import org.springframework.stereotype.Component;
+
+import java.util.List;
 
 /**
  * 类型为 delegateExpression 的 ExecutionListener 监听器示例
@@ -16,8 +20,15 @@
 
     @Override
     public void execute(DelegateExecution execution) {
-        log.info("[execute][execution({}) 被调用!变量有:{}]", execution.getId(),
+        log.info("[execute][execution({}) 执行监听器(委托表达式被调用)!变量有:{}]", execution.getId(),
                 execution.getCurrentFlowableListener().getFieldExtensions());
+        List<FieldExtension> fieldExtensions = execution.getCurrentFlowableListener().getFieldExtensions();
+        if(ObjectUtils.isNotEmpty(fieldExtensions)) {
+            fieldExtensions.stream().forEach(fieldExtension -> {
+                System.out.println(fieldExtension.getFieldName());
+                System.out.println(fieldExtension.getStringValue());
+            });
+        }
     }
 
 }
\ No newline at end of file

--
Gitblit v1.9.3