fix 修复 驳回删除任务可能空指针异常,调整示例状态

2.X
疯狂的狮子Li 8 months ago
parent 4108a15f56
commit e5cec7201d

@ -692,8 +692,10 @@ public class ActTaskServiceImpl implements IActTaskService {
MultiInstanceVo multiInstance = WorkflowUtils.isMultiInstance(task.getProcessDefinitionId(), task.getTaskDefinitionKey());
if (multiInstance == null && taskList.size() > 1) {
List<Task> tasks = StreamUtils.filter(taskList, e -> !e.getTaskDefinitionKey().equals(task.getTaskDefinitionKey()));
if (CollUtil.isNotEmpty(tasks)) {
actHiTaskinstMapper.deleteBatchIds(StreamUtils.toList(tasks, Task::getId));
}
}
List<HistoricTaskInstance> instanceList = QueryUtils.hisTaskInstanceQuery(processInstanceId).finished().orderByHistoricTaskInstanceEndTime().desc().list();

@ -122,7 +122,9 @@ public class TestLeaveServiceImpl implements ITestLeaveService {
public void processHandler(ProcessEvent processEvent) {
log.info("当前任务执行了{}", processEvent.toString());
TestLeave testLeave = baseMapper.selectById(Long.valueOf(processEvent.getBusinessKey()));
testLeave.setStatus(processEvent.getStatus());
if (processEvent.isSubmit()) {
testLeave.setStatus(BusinessStatusEnum.WAITING.getStatus());
}
baseMapper.updateById(testLeave);
}

Loading…
Cancel
Save