增加文档、视频教程的地址

This commit is contained in:
YunaiV 2022-07-21 00:10:59 +08:00
parent b0cdfd7afc
commit 907c7e763f
4 changed files with 15 additions and 10 deletions

View File

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.bpm.framework.flowable.core.listener;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import cn.iocoder.yudao.module.bpm.dal.dataobject.task.BpmTaskExtDO;
import cn.iocoder.yudao.module.bpm.service.task.BpmActivityService;
@ -16,6 +17,7 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
import java.util.Set;
/**
@ -63,15 +65,18 @@ public class BpmTaskEventListener extends AbstractFlowableEngineEventListener {
@Override
protected void activityCancelled(FlowableActivityCancelledEvent event) {
HistoricActivityInstance activity = activityService.getHistoricActivityByExecutionId(event.getActivityId());
if (activity == null) {
List<HistoricActivityInstance> activityList = activityService.getHistoricActivityListByExecutionId(event.getExecutionId());
if (CollUtil.isEmpty(activityList)) {
log.error("[activityCancelled][使用 executionId({}) 查找不到对应的活动实例]", event.getExecutionId());
return;
}
if (StrUtil.isEmpty(activity.getTaskId())) {
return;
}
taskService.updateTaskExtCancel(activity.getTaskId());
// 遍历处理
activityList.forEach(activity -> {
if (StrUtil.isEmpty(activity.getTaskId())) {
return;
}
taskService.updateTaskExtCancel(activity.getTaskId());
});
}
}

View File

@ -26,6 +26,6 @@ public interface BpmActivityService {
* @param executionId 执行编号
* @return 活动实例
*/
HistoricActivityInstance getHistoricActivityByExecutionId(String executionId);
List<HistoricActivityInstance> getHistoricActivityListByExecutionId(String executionId);
}

View File

@ -36,8 +36,8 @@ public class BpmActivityServiceImpl implements BpmActivityService {
}
@Override
public HistoricActivityInstance getHistoricActivityByExecutionId(String executionId) {
return historyService.createHistoricActivityInstanceQuery().executionId(executionId).singleResult();
public List<HistoricActivityInstance> getHistoricActivityListByExecutionId(String executionId) {
return historyService.createHistoricActivityInstanceQuery().executionId(executionId).list();
}
}