update 优化流程办理 流程挂起抛出异常

This commit is contained in:
gssong 2023-06-17 19:06:08 +08:00
parent db64ae65ea
commit e753eec014
2 changed files with 5 additions and 2 deletions

View File

@ -13,9 +13,9 @@ public interface FlowConstant {
*/ */
String NAMESPACE = "http://b3mn.org/stencilset/bpmn2.0#"; String NAMESPACE = "http://b3mn.org/stencilset/bpmn2.0#";
String MESSAGE_CURRENT_TASK_IS_NULL = "当前任务不存在或你不是任务办理人"; String MESSAGE_CURRENT_TASK_IS_NULL = "当前任务不存在或你不是任务办理人";
String MESSAGE_SUSPENDED = "当前任务已挂起"; String MESSAGE_SUSPENDED = "当前任务已挂起不可审批!";
/** /**
* 连线 * 连线

View File

@ -123,6 +123,9 @@ public class ActTaskServiceImpl implements IActTaskService {
if (task == null) { if (task == null) {
throw new ServiceException(FlowConstant.MESSAGE_CURRENT_TASK_IS_NULL); throw new ServiceException(FlowConstant.MESSAGE_CURRENT_TASK_IS_NULL);
} }
if (task.isSuspended()) {
throw new ServiceException(FlowConstant.MESSAGE_SUSPENDED);
}
//办理委托任务 //办理委托任务
if (ObjectUtil.isNotEmpty(task.getDelegationState()) && FlowConstant.PENDING.equals(task.getDelegationState().name())) { if (ObjectUtil.isNotEmpty(task.getDelegationState()) && FlowConstant.PENDING.equals(task.getDelegationState().name())) {
taskService.resolveTask(completeTaskBo.getTaskId()); taskService.resolveTask(completeTaskBo.getTaskId());