Package com.codingapi.flow.node
Class BaseFlowNode
java.lang.Object
com.codingapi.flow.node.BaseFlowNode
- All Implemented Interfaces:
IMapConvertor,IFlowNode
- Direct Known Subclasses:
BaseAuditNode,ConditionBranchNode,DelayNode,EndNode,InclusiveBranchNode,ParallelBranchNode,RouterNode,StartNode,SubProcessNode,TriggerNode
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<IFlowAction>节点操作protected String节点idprotected String节点名称protected int条件顺序,越小则优先级越高protected List<INodeStrategy>节点策略 -
Constructor Summary
ConstructorsConstructorDescriptionBaseFlowNode(String name, String id) BaseFlowNode(String id, String name, int order) BaseFlowNode(String id, String name, int order, List<IFlowAction> actions, List<INodeStrategy> strategies) BaseFlowNode(String id, String name, List<IFlowAction> actions) -
Method Summary
Modifier and TypeMethodDescription获取节点操作对象管理器booleanvoidfillNewRecord(FlowSession session, FlowRecord flowRecord) 填充流程记录,在保存流程记录时将会触发当前节点的填充流程记录函数。filterBranches(List<IFlowNode> nodeList, FlowSession flowSession) 过滤条件分支static <T extends BaseFlowNode>
TgenerateCurrentRecords(FlowSession session) 构建当前节点下的流程记录,不需要创建记录的返回 空集合booleanhandle(FlowSession session) 是否执行节点 当前流程节点执行完成以后,触发下一环节时执行的函数,当返回true时则将继续执行后续节点的handle流程,当返回false时则不继续执行后续流程,将执行当前节点的创建流程记录函数IFlowNode.generateCurrentRecords(FlowSession)booleanisDone(FlowSession session) 节点是否完成booleanisWaitRecordMargeParallelNode(FlowSession session) 是否等待并行节点的汇聚voidsetActions(List<IFlowAction> actions) voidsetStrategies(List<INodeStrategy> strategies) 节点策略获取节点策略管理器toMap()voidverifyNode(FormMeta form) 节点验证 用于流程配置完成以后的验证时触发voidverifySession(FlowSession session) 节点验证会话 流程执行continueTrigger之前需要先对判断请求会话的参数是否满足节点参数要求
-
Field Details
-
id
节点id -
name
节点名称 -
order
protected int order条件顺序,越小则优先级越高 -
actions
节点操作 -
strategies
节点策略
-
-
Constructor Details
-
BaseFlowNode
-
BaseFlowNode
-
BaseFlowNode
-
BaseFlowNode
public BaseFlowNode(String id, String name, int order, List<IFlowAction> actions, List<INodeStrategy> strategies)
-
-
Method Details
-
setStrategies
节点策略- Parameters:
strategies- 节点策略
-
setActions
-
toMap
- Specified by:
toMapin interfaceIMapConvertor
-
fromMap
-
verifyNode
Description copied from interface:IFlowNode节点验证 用于流程配置完成以后的验证时触发- Specified by:
verifyNodein interfaceIFlowNode
-
isWaitRecordMargeParallelNode
是否等待并行节点的汇聚 -
handle
Description copied from interface:IFlowNode是否执行节点 当前流程节点执行完成以后,触发下一环节时执行的函数,当返回true时则将继续执行后续节点的handle流程,当返回false时则不继续执行后续流程,将执行当前节点的创建流程记录函数IFlowNode.generateCurrentRecords(FlowSession) -
verifySession
Description copied from interface:IFlowNode节点验证会话 流程执行continueTrigger之前需要先对判断请求会话的参数是否满足节点参数要求- Specified by:
verifySessionin interfaceIFlowNode
-
isDone
Description copied from interface:IFlowNode节点是否完成 -
fillNewRecord
Description copied from interface:IFlowNode填充流程记录,在保存流程记录时将会触发当前节点的填充流程记录函数。由于不同节点存储的流程数据会存在差异。- Specified by:
fillNewRecordin interfaceIFlowNode- Parameters:
session- 会话flowRecord- 流程记录
-
filterBranches
Description copied from interface:IFlowNode过滤条件分支- Specified by:
filterBranchesin interfaceIFlowNode- Parameters:
nodeList- 当前节点下的所有条件flowSession- 当前会话- Returns:
- 匹配的节点
-
generateCurrentRecords
Description copied from interface:IFlowNode构建当前节点下的流程记录,不需要创建记录的返回 空集合- Specified by:
generateCurrentRecordsin interfaceIFlowNode- Parameters:
session- 会话- Returns:
- 流程记录
-
actionManager
Description copied from interface:IFlowNode获取节点操作对象管理器- Specified by:
actionManagerin interfaceIFlowNode- Returns:
- 节点操作对象管理器
-
strategyManager
Description copied from interface:IFlowNode获取节点策略管理器- Specified by:
strategyManagerin interfaceIFlowNode- Returns:
- 节点策略管理器
-
equals
-