类 FlowEngineImpl
java.lang.Object
net.sohelp.boot.engine.workflow.core.FlowEngineImpl
- 所有已实现的接口:
FlowEngine
基本的流程引擎实现类
- 从以下版本开始:
- 1.0
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanautoCompleteTask(Long taskId, Map<String, Object> args, FlowCreator flowCreator) 自动完成任务booleanautoJumpTask(Long taskId, Map<String, Object> args, FlowCreator flowCreator) 自动跳转任务booleanautoRejectTask(FlwTask flwTask, Map<String, Object> args, FlowCreator flowCreator) 自动拒绝任务configure(FlowContext flowLongContext) 根据Configuration对象配置实现类booleancreateCcTask(NodeModel taskModel, FlwTask flwTask, List<NodeAssignee> ccUserList, FlowCreator flowCreator) 创建抄送任务protected ExecutioncreateExecution(ProcessModel processModel, FlwInstance flwInstance, FlwTask flwTask, FlowCreator flowCreator, Map<String, Object> args) createNewTask(Long taskId, TaskType taskType, PerformType performType, List<FlwTaskActor> taskActors, FlowCreator flowCreator, Map<String, Object> args) 根据已有任务、参与者创建新的任务booleanexecuteAppendNodeModel(Long taskId, NodeModel nodeModel, FlowCreator flowCreator, Map<String, Object> args, boolean beforeAfter) 执行追加节点模型booleanexecuteFinishTrigger(Long taskId, FlowCreator flowCreator, Map<String, Object> args) 根据 触发器任务ID,创建人信息,参数列表执行完成触发器任务executeJumpTask(Long taskId, String nodeKey, FlowCreator flowCreator, Map<String, Object> args, TaskType taskType) executeRejectTask(FlwTask currentFlwTask, String nodeKey, FlowCreator flowCreator, Map<String, Object> args, boolean termination) 根据当前任务对象驳回至指定 nodeKey 节点,如果 nodeKey 为空默认为上一步处理executeRejectTask(FlwTask currentFlwTask, String nodeKey, FlowCreator flowCreator, Map<String, Object> args, boolean termination, Supplier<Optional<List<FlwTask>>> terminateProcess) booleanexecuteRemoveNodeModel(Long instanceId, String nodeKey) 执行删除临时节点模型booleanexecuteResumeTask(Long instanceId, FlowCreator flowCreator, Map<String, Object> args) 执行唤醒撤回或拒绝终止历史任务(只有实例发起人可操作)booleanexecuteTask(Long taskId, FlowCreator flowCreator, Map<String, Object> args) 根据任务ID,创建人信息,参数列表执行任务protected booleanexecuteTask(Long taskId, FlowCreator flowCreator, Map<String, Object> args, TaskState taskState, TaskEventType eventType) protected FlwInstancegetFlwInstance(Long instanceId, String updateBy) protected FlwInstancegetFlwInstance(Long instanceId, String updateBy, Consumer<FlwInstance> instanceConsumer) 获取流程实例voidrestartProcessInstance(Long id, String currentNodeKey, Execution execution) 重启流程实例(从当前所在节点currentNode位置开始)startInstanceById(Long id, FlowCreator flowCreator, Map<String, Object> args, boolean saveAsDraft, Supplier<FlwInstance> supplier) 根据流程定义ID,创建人,参数列表启动流程实例startInstanceByProcessKey(String processKey, Integer version, FlowCreator flowCreator, Map<String, Object> args, boolean saveAsDraft, Supplier<FlwInstance> supplier) 根据流程定义key、版本号、创建人、参数列表启动流程实例startProcessInstance(FlwProcess process, FlowCreator flowCreator, Map<String, Object> args, boolean saveAsDraft, Supplier<FlwInstance> supplier) 根据流程对象启动流程实例从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 net.sohelp.boot.engine.workflow.FlowEngine
autoCompleteTask, autoCompleteTask, autoJumpTask, autoRejectTask, autoRejectTask, createCcTask, executeAppendNodeModel, executeFinishTrigger, executeJumpTask, executeJumpTask, executeRejectTask, executeRejectTask, executeRejectTask, executeRejectTask, executeResumeTask, executeTask, processService, queryService, runtimeService, startInstanceById, startInstanceById, startInstanceById, startInstanceById, startInstanceById, startInstanceById, startInstanceByProcessKey, startInstanceByProcessKey, startInstanceByProcessKey, startInstanceByProcessKey, startInstanceByProcessKey, startInstanceByProcessKey, startInstanceByProcessKey, startInstanceByProcessKey, taskService
-
字段详细资料
-
flowLongContext
配置对象
-
-
构造器详细资料
-
FlowEngineImpl
public FlowEngineImpl()
-
-
方法详细资料
-
configure
从接口复制的说明:FlowEngine根据Configuration对象配置实现类- 指定者:
configure在接口中FlowEngine- 参数:
flowLongContext- 全局配置对象- 返回:
- FlowLongEngine 流程引擎
-
getContext
- 指定者:
getContext在接口中FlowEngine
-
startInstanceById
public Optional<FlwInstance> startInstanceById(Long id, FlowCreator flowCreator, Map<String, Object> args, boolean saveAsDraft, Supplier<FlwInstance> supplier) 根据流程定义ID,创建人,参数列表启动流程实例- 指定者:
startInstanceById在接口中FlowEngine- 参数:
id- 流程定义IDflowCreator- 流程实例任务创建者args- 参数列表saveAsDraft- 暂存草稿supplier- 初始化流程实例提供者- 返回:
FlwInstance流程实例
-
startInstanceByProcessKey
public Optional<FlwInstance> startInstanceByProcessKey(String processKey, Integer version, FlowCreator flowCreator, Map<String, Object> args, boolean saveAsDraft, Supplier<FlwInstance> supplier) 根据流程定义key、版本号、创建人、参数列表启动流程实例- 指定者:
startInstanceByProcessKey在接口中FlowEngine- 参数:
processKey- 流程定义keyversion- 版本号flowCreator- 流程实例任务创建者args- 参数列表saveAsDraft- 暂存草稿supplier- 初始化流程实例提供者- 返回:
FlwInstance流程实例
-
startProcessInstance
public Optional<FlwInstance> startProcessInstance(FlwProcess process, FlowCreator flowCreator, Map<String, Object> args, boolean saveAsDraft, Supplier<FlwInstance> supplier) 根据流程对象启动流程实例- 指定者:
startProcessInstance在接口中FlowEngine- 参数:
process- 流程定义对象flowCreator- 流程创建者args- 执行参数saveAsDraft- 暂存草稿supplier- 初始化流程实例提供者- 返回:
FlwInstance流程实例
-
restartProcessInstance
重启流程实例(从当前所在节点currentNode位置开始)- 指定者:
restartProcessInstance在接口中FlowEngine- 参数:
id- 流程定义IDcurrentNodeKey- 当前所在节点execution-Execution
-
executeTask
根据任务ID,创建人信息,参数列表执行任务- 指定者:
executeTask在接口中FlowEngine- 参数:
taskId- 任务IDflowCreator- 任务创建者args- 参数列表- 返回:
- true 成功 false 失败
-
executeFinishTrigger
根据 触发器任务ID,创建人信息,参数列表执行完成触发器任务- 指定者:
executeFinishTrigger在接口中FlowEngine- 参数:
taskId- 任务IDflowCreator- 任务创建者args- 全局参数列表- 返回:
- true 成功 false 失败
-
autoJumpTask
自动跳转任务- 指定者:
autoJumpTask在接口中FlowEngine- 参数:
taskId- 任务IDargs- 任务参数flowCreator- 任务创建者- 返回:
- true 成功 false 失败
-
executeTask
protected boolean executeTask(Long taskId, FlowCreator flowCreator, Map<String, Object> args, TaskState taskState, TaskEventType eventType) -
autoCompleteTask
自动完成任务- 指定者:
autoCompleteTask在接口中FlowEngine- 参数:
taskId- 任务IDargs- 任务参数flowCreator- 任务创建者- 返回:
- true 成功 false 失败
-
autoRejectTask
自动拒绝任务- 指定者:
autoRejectTask在接口中FlowEngine- 参数:
flwTask- 任务对象args- 任务参数flowCreator- 任务创建者- 返回:
- true 成功 false 失败
-
executeJumpTask
public Optional<List<FlwTask>> executeJumpTask(Long taskId, String nodeKey, FlowCreator flowCreator, Map<String, Object> args, TaskType taskType) - 指定者:
executeJumpTask在接口中FlowEngine
-
executeRejectTask
public Optional<List<FlwTask>> executeRejectTask(FlwTask currentFlwTask, String nodeKey, FlowCreator flowCreator, Map<String, Object> args, boolean termination) 从接口复制的说明:FlowEngine根据当前任务对象驳回至指定 nodeKey 节点,如果 nodeKey 为空默认为上一步处理- 指定者:
executeRejectTask在接口中FlowEngine- 参数:
currentFlwTask- 当前任务对象nodeKey- 跳转的节点keyflowCreator- 任务创建者args- 任务参数termination- 是否终止流程,该参数为 true 时,其它驳回策略无效- 返回:
- Task 任务对象
-
executeRejectTask
-
executeResumeTask
从接口复制的说明:FlowEngine执行唤醒撤回或拒绝终止历史任务(只有实例发起人可操作)- 指定者:
executeResumeTask在接口中FlowEngine- 参数:
instanceId- 历史实例IDflowCreator- 任务唤醒者args- 任务参数- 返回:
- true 成功 false 失败
-
createNewTask
public List<FlwTask> createNewTask(Long taskId, TaskType taskType, PerformType performType, List<FlwTaskActor> taskActors, FlowCreator flowCreator, Map<String, Object> args) 从接口复制的说明:FlowEngine根据已有任务、参与者创建新的任务适用于动态转派,动态协办等处理且流程图中不体现节点情况
- 指定者:
createNewTask在接口中FlowEngine- 参数:
taskId- 主办任务IDtaskType- 任务类型performType- 参与类型taskActors- 参与者集合flowCreator- 任务创建者args- 任务参数- 返回:
- 创建任务集合
-
createCcTask
public boolean createCcTask(NodeModel taskModel, FlwTask flwTask, List<NodeAssignee> ccUserList, FlowCreator flowCreator) 创建抄送任务默认不校验是否重复抄送
- 指定者:
createCcTask在接口中FlowEngine- 参数:
taskModel- 任务模型flwTask- 当前任务ccUserList- 抄送任务分配到任务的人或角色列表flowCreator- 任务创建者
-
executeAppendNodeModel
public boolean executeAppendNodeModel(Long taskId, NodeModel nodeModel, FlowCreator flowCreator, Map<String, Object> args, boolean beforeAfter) 从接口复制的说明:FlowEngine执行追加节点模型- 指定者:
executeAppendNodeModel在接口中FlowEngine- 参数:
taskId- 当前任务IDnodeModel- 加签节点模型flowCreator- 任务创建者args- 任务参数beforeAfter- true 前置 false 后置- 返回:
- true 成功 false 失败
-
executeRemoveNodeModel
从接口复制的说明:FlowEngine执行删除临时节点模型- 指定者:
executeRemoveNodeModel在接口中FlowEngine- 参数:
instanceId- 流程实例IDnodeKey- 节点KEY
-
getFlwInstance
protected FlwInstance getFlwInstance(Long instanceId, String updateBy, Consumer<FlwInstance> instanceConsumer) 获取流程实例- 参数:
instanceId- 流程实例IDupdateBy- 更新人instanceConsumer- 流程实例处理函数- 返回:
FlwInstance
-
getFlwInstance
-
createExecution
protected Execution createExecution(ProcessModel processModel, FlwInstance flwInstance, FlwTask flwTask, FlowCreator flowCreator, Map<String, Object> args)
-