update 优化监听事件注释
This commit is contained in:
parent
97dca674a0
commit
dad53204dd
@ -18,12 +18,12 @@ import org.springframework.stereotype.Component;
|
|||||||
public class FlowProcessEventHandler {
|
public class FlowProcessEventHandler {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 总体流程监听(例如: 提交 退回 撤销 终止 作废等)
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成等)
|
||||||
*
|
*
|
||||||
* @param flowCode 流程定义编码
|
* @param flowCode 流程定义编码
|
||||||
* @param businessId 业务id
|
* @param businessId 业务id
|
||||||
* @param status 状态
|
* @param status 状态
|
||||||
* @param submit 当为true时为申请人节点办理
|
* @param submit 当为true时为申请人节点办理
|
||||||
*/
|
*/
|
||||||
public void processHandler(String flowCode, String businessId, String status, boolean submit) {
|
public void processHandler(String flowCode, String businessId, String status, boolean submit) {
|
||||||
log.info("发布流程事件,流程状态: {}, 流程编码: {}, 业务ID: {}", status, flowCode, businessId);
|
log.info("发布流程事件,流程状态: {}, 流程编码: {}, 业务ID: {}", status, flowCode, businessId);
|
||||||
@ -38,9 +38,9 @@ public class FlowProcessEventHandler {
|
|||||||
/**
|
/**
|
||||||
* 执行办理任务监听
|
* 执行办理任务监听
|
||||||
*
|
*
|
||||||
* @param flowCode 流程定义编码
|
* @param flowCode 流程定义编码
|
||||||
* @param nodeCode 审批节点编码
|
* @param nodeCode 审批节点编码
|
||||||
* @param taskId 任务id
|
* @param taskId 任务id
|
||||||
* @param businessId 业务id
|
* @param businessId 业务id
|
||||||
*/
|
*/
|
||||||
public void processTaskHandler(String flowCode, String nodeCode, Long taskId, String businessId) {
|
public void processTaskHandler(String flowCode, String nodeCode, Long taskId, String businessId) {
|
||||||
|
@ -14,7 +14,6 @@ import org.dromara.warm.flow.orm.entity.FlowTask;
|
|||||||
import org.dromara.workflow.handler.FlowProcessEventHandler;
|
import org.dromara.workflow.handler.FlowProcessEventHandler;
|
||||||
import org.dromara.workflow.service.IFlwInstanceService;
|
import org.dromara.workflow.service.IFlwInstanceService;
|
||||||
import org.dromara.workflow.service.IFlwTaskService;
|
import org.dromara.workflow.service.IFlwTaskService;
|
||||||
import org.dromara.workflow.utils.WorkflowUtils;
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -80,7 +79,7 @@ public class WorkflowGlobalListener implements GlobalListener {
|
|||||||
Definition definition = listenerVariable.getDefinition();
|
Definition definition = listenerVariable.getDefinition();
|
||||||
String businessId = instance.getBusinessId();
|
String businessId = instance.getBusinessId();
|
||||||
String flowStatus = instance.getFlowStatus();
|
String flowStatus = instance.getFlowStatus();
|
||||||
// 判断流程状态(发布:驳回,作废,终止,作废,已完成事件)
|
// 判断流程状态(发布:撤销,退回,作废,终止,已完成事件)
|
||||||
String status = determineFlowStatus(instance, flowStatus);
|
String status = determineFlowStatus(instance, flowStatus);
|
||||||
if (StringUtils.isNotBlank(status)) {
|
if (StringUtils.isNotBlank(status)) {
|
||||||
flowProcessEventHandler.processHandler(definition.getFlowCode(), businessId, status, false);
|
flowProcessEventHandler.processHandler(definition.getFlowCode(), businessId, status, false);
|
||||||
|
@ -118,7 +118,7 @@ public class TestLeaveServiceImpl implements ITestLeaveService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 总体流程监听(例如: 提交 退回 撤销 终止 作废等)
|
* 总体流程监听(例如: 草稿,撤销,退回,作废,终止,已完成等)
|
||||||
* 正常使用只需#processEvent.flowCode=='leave1'
|
* 正常使用只需#processEvent.flowCode=='leave1'
|
||||||
* 示例为了方便则使用startsWith匹配了全部示例key
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
*
|
*
|
||||||
@ -154,7 +154,9 @@ public class TestLeaveServiceImpl implements ITestLeaveService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 监听删除流程事件,仅处理特定流程定义编码为 "leave1" 的事件
|
* 监听删除流程事件
|
||||||
|
* 正常使用只需#processDeleteEvent.flowCode=='leave1'
|
||||||
|
* 示例为了方便则使用startsWith匹配了全部示例key
|
||||||
*
|
*
|
||||||
* @param processDeleteEvent 参数
|
* @param processDeleteEvent 参数
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user