From 9d355750518c2f9d771b59a05920354faeaa19af Mon Sep 17 00:00:00 2001
From: 疯狂的狮子Li <15040126243@163.com>
Date: 星期二, 26 三月 2024 10:37:39 +0800
Subject: [PATCH] update springboot 3.2.3 => 3.2.4 update springdoc 2.3.0 => 2.4.0 update springboot-admin 3.2.2 => 3.2.3 update redisson 3.27.0 => 3.27.2 update sms4j 3.1.1 => 3.2.0

---
 ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/utils/ModelUtils.java |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/utils/ModelUtils.java b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/utils/ModelUtils.java
index f5049b8..0d59b85 100644
--- a/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/utils/ModelUtils.java
+++ b/ruoyi-modules/ruoyi-workflow/src/main/java/org/dromara/workflow/utils/ModelUtils.java
@@ -195,7 +195,7 @@
      *
      * @param processDefinitionId 娴佺▼瀹氫箟id
      */
-    public Map<String, List<ExtensionElement>> getExtensionElements(String processDefinitionId) {
+    public static Map<String, List<ExtensionElement>> getExtensionElements(String processDefinitionId) {
         Map<String, List<ExtensionElement>> map = new HashMap<>();
         List<FlowElement> flowElements = getFlowElements(processDefinitionId);
         for (FlowElement flowElement : flowElements) {
@@ -212,10 +212,22 @@
      * @param processDefinitionId 娴佺▼瀹氫箟id
      * @param flowElementId       鑺傜偣id
      */
-    public Map<String, List<ExtensionElement>> getExtensionElement(String processDefinitionId, String flowElementId) {
+    public static Map<String, List<ExtensionElement>> getExtensionElement(String processDefinitionId, String flowElementId) {
         BpmnModel bpmnModel = ProcessDefinitionUtil.getBpmnModel(processDefinitionId);
         Process process = bpmnModel.getMainProcess();
         FlowElement flowElement = process.getFlowElement(flowElementId);
         return flowElement.getExtensionElements();
     }
+
+    /**
+     * 鍒ゆ柇褰撳墠鑺傜偣鏄惁涓虹敤鎴蜂换鍔�
+     *
+     * @param processDefinitionId 娴佺▼瀹氫箟id
+     * @param taskDefinitionKey   娴佺▼瀹氫箟id
+     */
+    public static boolean isUserTask(String processDefinitionId, String taskDefinitionKey) {
+        BpmnModel bpmnModel = ProcessDefinitionUtil.getBpmnModel(processDefinitionId);
+        FlowNode flowNode = (FlowNode) bpmnModel.getFlowElement(taskDefinitionKey);
+        return flowNode instanceof UserTask;
+    }
 }

--
Gitblit v1.9.3