public class ModelHelper extends Object
| 构造器和说明 | 
|---|
| ModelHelper() | 
| 限定符和类型 | 方法和说明 | 
|---|---|
| static int | checkConditionNode(NodeModel nodeModel)检查条件节点 | 
| static boolean | checkDuplicateNodeKeys(NodeModel rootNodeModel)检查是否存在重复节点名称 | 
| static boolean | checkExistApprovalNode(NodeModel rootNodeModel)检查是否存在审批节点 | 
| static NodeModel | findNextNode(NodeModel nodeModel,
            List<String> currentTask)递归查找下一个执行节点 | 
| static String | generateNodeKey()生成节点KEY规则(flk + 时间戳) | 
| static List<String> | getAllPreviousNodeKeys(NodeModel nodeModel)获取所有上一个节点key,不包含抄送节点 | 
| static List<String> | getAllUsedNodeKeys(FlowContext flowLongContext,
                  Execution execution,
                  NodeModel rootNodeModel,
                  String currentNodeKey)获取当前已使用的节点key列表 | 
| static void | getChildAllUsedNodeKeys(List<String> currentUsedNodeKeys,
                       FlowContext flowLongContext,
                       Execution execution,
                       NodeModel rootNodeModel,
                       String currentNodeKey) | 
| static List<NodeModel> | getNextChildNodes(FlowContext flowLongContext,
                 Execution execution,
                 NodeModel rootNodeModel,
                 String currentNodeKey)动态获取下一个节点 | 
| static NodeModel | getNodeModel(String nodeKey,
            NodeModel rootNodeModel)获取指定节点KEY模型信息 | 
| static List<NodeModel> | getRootNodeAllChildNodes(NodeModel rootNodeModel)获取根节点下的所有节点类型【 注意,只对根节点查找有效!】 | 
| static List<NodeModel> | getUnsetAssigneeNodes(NodeModel rootNodeModel)获取所有未设置处理人员节点【非发起人自己,只包含 1,审批 2,抄送 节点】 | 
| static void | reloadProcessModel(ProcessModel processModel,
                  Consumer<ProcessModel> consumer)重新加载流程模型 | 
public static List<NodeModel> getNextChildNodes(FlowContext flowLongContext, Execution execution, NodeModel rootNodeModel, String currentNodeKey)
flowLongContext - 流程上下文 FlowContextexecution - 流程执行对象 ExecutionrootNodeModel - 根节点currentNodeKey - 当前节点public static NodeModel findNextNode(NodeModel nodeModel, List<String> currentTask)
nodeModel - 当前节点currentTask - 当前任务列表public static List<String> getAllPreviousNodeKeys(NodeModel nodeModel)
nodeModel - 当前节点public static List<NodeModel> getUnsetAssigneeNodes(NodeModel rootNodeModel)
rootNodeModel - 根节点模型public static List<NodeModel> getRootNodeAllChildNodes(NodeModel rootNodeModel)
rootNodeModel - 根节点模型public static boolean checkDuplicateNodeKeys(NodeModel rootNodeModel)
rootNodeModel - 根节点模型public static int checkConditionNode(NodeModel nodeModel)
nodeModel - NodeModelpublic static boolean checkExistApprovalNode(NodeModel rootNodeModel)
rootNodeModel - 根节点模型public static String generateNodeKey()
public static NodeModel getNodeModel(String nodeKey, NodeModel rootNodeModel)
nodeKey - 节点 KEYrootNodeModel - 根节点模型public static void reloadProcessModel(ProcessModel processModel, Consumer<ProcessModel> consumer)
processModel - 流程模型consumer - 流程模型消费public static List<String> getAllUsedNodeKeys(FlowContext flowLongContext, Execution execution, NodeModel rootNodeModel, String currentNodeKey)
flowLongContext - 流程上下文 FlowContextexecution - 流程执行对象 ExecutionrootNodeModel - 模型根节点 NodeModelcurrentNodeKey - 当前所在节点Copyright © 2025. All rights reserved.