update 调整流程实例查询

This commit is contained in:
songgaoshuai 2023-10-27 16:46:12 +08:00
parent 5912983704
commit e26982f001

View File

@ -542,7 +542,9 @@ public class ActProcessInstanceServiceImpl implements IActProcessInstanceService
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public boolean taskUrging(TaskUrgingBo taskUrgingBo) { public boolean taskUrging(TaskUrgingBo taskUrgingBo) {
try { try {
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(taskUrgingBo.getProcessInstanceId()).singleResult(); ProcessInstance processInstance = runtimeService.createProcessInstanceQuery()
.processInstanceId(taskUrgingBo.getProcessInstanceId())
.processInstanceTenantId(TenantHelper.getTenantId()).singleResult();
if (processInstance == null) { if (processInstance == null) {
throw new ServiceException("任务已结束!"); throw new ServiceException("任务已结束!");
} }