public class RuntimeServiceImpl extends Object implements RuntimeService
构造器和说明 |
---|
RuntimeServiceImpl(InstanceListener instanceListener,
QueryService queryService,
TaskService taskService,
FlwInstanceDao instanceDao,
FlwHisInstanceDao hisInstanceDao,
FlwExtInstanceDao extInstanceDao) |
限定符和类型 | 方法和说明 |
---|---|
boolean |
addVariable(Long instanceId,
Map<String,Object> args,
Function<FlwInstance,FlwInstance> function)
根据 流程实例ID 更新流程实例全局变量
|
void |
appendNodeModel(Long taskId,
NodeModel nodeModel,
boolean beforeAfter)
追加节点模型(不执行任务跳转)
执行追加节点模型调用
FlowEngine.executeAppendNodeModel(Long, NodeModel, FlowCreator, boolean)
|
void |
cascadeRemoveByInstanceId(Long instanceId)
级联删除表 flw_his_task_actor, flw_his_task, flw_task_actor, flw_task, flw_instance, flw_his_instance
|
void |
cascadeRemoveByProcessId(Long processId)
级联删除指定流程实例的所有数据
删除表 flw_his_task_actor, flw_his_task, flw_task_actor, flw_task, flw_his_instance, flw_ext_instance, flw_instance
|
FlwInstance |
createInstance(FlwProcess flwProcess,
FlowCreator flowCreator,
Map<String,Object> args,
NodeModel nodeModel,
Supplier<FlwInstance> supplier)
创建活动实例
|
boolean |
endInstance(Execution execution,
Long instanceId,
NodeModel endNode)
删除活动流程实例数据,更新历史流程实例的状态、结束时间
|
protected boolean |
forceComplete(Long instanceId,
FlowCreator flowCreator,
InstanceState instanceState,
TaskEventType eventType)
强制完成流程实例
|
protected void |
forceCompleteAll(FlwInstance flwInstance,
FlowCreator flowCreator,
InstanceState instanceState,
TaskEventType eventType)
强制完成流程所有实例
|
protected FlwHisInstance |
getFlwHisInstance(Long instanceId,
NodeModel endNode,
FlwInstance flwInstance) |
ProcessModel |
getProcessModelByInstanceId(Long instanceId)
根据流程实例ID获取流程实例模型
|
protected void |
instanceNotify(InstanceEventType eventType,
Supplier<FlwHisInstance> supplier,
FlowCreator flowCreator) |
boolean |
reject(Long instanceId,
FlowCreator flowCreator)
流程实例拒绝审批强制终止(用于后续审核人员认为该审批不再需要继续,拒绝审批强行终止)
|
boolean |
revoke(Long instanceId,
FlowCreator flowCreator)
流程实例撤销(用于错误发起审批申请,发起人主动撤销)
|
void |
saveInstance(FlwInstance flwInstance,
FlwProcess flwProcess,
FlowCreator flowCreator)
流程实例数据会保存至活动实例表、历史实例表
|
boolean |
terminate(Long instanceId,
FlowCreator flowCreator)
强制终止活动实例,并强制完成活动任务
|
boolean |
timeout(Long instanceId,
FlowCreator flowCreator)
流程实例超时(设定审批时间超时,自动结束)
|
void |
updateInstance(FlwInstance flwInstance)
更新活动实例
|
boolean |
updateInstanceModelById(Long instanceId,
ProcessModel processModel)
根据 流程实例ID 更新流程实例模型内容
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addVariable, timeout
public RuntimeServiceImpl(InstanceListener instanceListener, QueryService queryService, TaskService taskService, FlwInstanceDao instanceDao, FlwHisInstanceDao hisInstanceDao, FlwExtInstanceDao extInstanceDao)
public FlwInstance createInstance(FlwProcess flwProcess, FlowCreator flowCreator, Map<String,Object> args, NodeModel nodeModel, Supplier<FlwInstance> supplier)
createInstance
在接口中 RuntimeService
flwProcess
- 流程定义对象flowCreator
- 流程实例任务创建者args
- 参数列表nodeModel
- 当前所在节点supplier
- 初始化流程实例提供者public ProcessModel getProcessModelByInstanceId(Long instanceId)
getProcessModelByInstanceId
在接口中 RuntimeService
instanceId
- 流程实例IDProcessModel
public boolean addVariable(Long instanceId, Map<String,Object> args, Function<FlwInstance,FlwInstance> function)
RuntimeService
addVariable
在接口中 RuntimeService
instanceId
- 流程实例IDargs
- 流程实例参数function
- 待更新实例回调处理函数public boolean endInstance(Execution execution, Long instanceId, NodeModel endNode)
endInstance
在接口中 RuntimeService
execution
- Execution
instanceId
- 流程实例IDendNode
- 结束节点protected FlwHisInstance getFlwHisInstance(Long instanceId, NodeModel endNode, FlwInstance flwInstance)
protected void instanceNotify(InstanceEventType eventType, Supplier<FlwHisInstance> supplier, FlowCreator flowCreator)
public void saveInstance(FlwInstance flwInstance, FlwProcess flwProcess, FlowCreator flowCreator)
saveInstance
在接口中 RuntimeService
flwInstance
- 流程实例对象flwProcess
- 流程定义对象flowCreator
- 处理人员public boolean reject(Long instanceId, FlowCreator flowCreator)
RuntimeService
reject
在接口中 RuntimeService
instanceId
- 流程实例IDflowCreator
- 处理人员public boolean revoke(Long instanceId, FlowCreator flowCreator)
RuntimeService
revoke
在接口中 RuntimeService
instanceId
- 流程实例IDflowCreator
- 处理人员public boolean timeout(Long instanceId, FlowCreator flowCreator)
RuntimeService
timeout
在接口中 RuntimeService
instanceId
- 流程实例IDflowCreator
- 处理人员public boolean terminate(Long instanceId, FlowCreator flowCreator)
terminate
在接口中 RuntimeService
instanceId
- 流程实例IDflowCreator
- 处理人员protected boolean forceComplete(Long instanceId, FlowCreator flowCreator, InstanceState instanceState, TaskEventType eventType)
instanceId
- 流程实例IDflowCreator
- 处理人员instanceState
- 流程实例最终状态eventType
- 监听事件类型protected void forceCompleteAll(FlwInstance flwInstance, FlowCreator flowCreator, InstanceState instanceState, TaskEventType eventType)
public void updateInstance(FlwInstance flwInstance)
updateInstance
在接口中 RuntimeService
flwInstance
- 流程实例对象public boolean updateInstanceModelById(Long instanceId, ProcessModel processModel)
RuntimeService
updateInstanceModelById
在接口中 RuntimeService
instanceId
- 流程实例IDprocessModel
- 流程模型public void cascadeRemoveByProcessId(Long processId)
删除表 flw_his_task_actor, flw_his_task, flw_task_actor, flw_task, flw_his_instance, flw_ext_instance, flw_instance
cascadeRemoveByProcessId
在接口中 RuntimeService
processId
- 流程IDpublic void cascadeRemoveByInstanceId(Long instanceId)
RuntimeService
cascadeRemoveByInstanceId
在接口中 RuntimeService
instanceId
- 流程实例IDpublic void appendNodeModel(Long taskId, NodeModel nodeModel, boolean beforeAfter)
RuntimeService
执行追加节点模型调用 FlowEngine.executeAppendNodeModel(Long, NodeModel, FlowCreator, boolean)
appendNodeModel
在接口中 RuntimeService
taskId
- 任务IDnodeModel
- 节点模型beforeAfter
- true 前置 false 后置Copyright © 2025. All rights reserved.