Merge remote-tracking branch 'origin/REQ-2324' into REQ-2324
This commit is contained in:
commit
64fb057efd
@ -71,6 +71,11 @@ public class CustomApproveTaskCmd implements Command<Void>, Serializable {
|
||||
this.nodeTypes = dto.getNodeTypes();
|
||||
}
|
||||
|
||||
public CustomApproveTaskCmd(String taskId, String advice, String operationDesc, List<AttachmentDTO> attachmentList,
|
||||
BpmnTaskDelegateAssigner approver, BpmnTaskDelegateAssigner nextApprover) {
|
||||
this(taskId, advice, operationDesc, attachmentList, approver, nextApprover, null);
|
||||
}
|
||||
|
||||
public CustomApproveTaskCmd(String taskId, String advice, String operationDesc, List<AttachmentDTO> attachmentList,
|
||||
BpmnTaskDelegateAssigner approver, BpmnTaskDelegateAssigner nextApprover,
|
||||
List<BpmnFlowNodeType> nodeTypes) {
|
||||
@ -96,6 +101,9 @@ public class CustomApproveTaskCmd implements Command<Void>, Serializable {
|
||||
Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
|
||||
validTask(historicTaskInstance, (TaskEntity) task, approver, nodeTypes);
|
||||
|
||||
// TODO 所有的跟 Task 相关的动作都可以在这里进行扩展,用于扩展八大按钮标准动作以外的一些逻辑,但这里需要结合 Spring 能力,需设计好扩展点,否则无法进行扩展
|
||||
// 其他动态也应该在类似的地方预留扩展点
|
||||
|
||||
if (StringUtils.hasLength(advice)) {
|
||||
Authentication.setAuthenticatedUserId(approver.buildAssigneeId());
|
||||
addComment(commandContext, task, COMMENT_TYPE_ADVICE, advice);
|
||||
|
||||
@ -305,7 +305,7 @@ public class AutoOperatorEvent_101_Listener extends AbstractBpmnEventListener<Ta
|
||||
BpmnTaskDelegateAssigner assigner = BpmnTaskDelegateAssigner.toObjectCompatible(
|
||||
delegateTask.getVariable(INTERNAL_TASK_RELATION_ASSIGNEE_INFO + delegateTask.getId()));
|
||||
commandExecutor.execute(new CustomApproveTaskCmd(delegateTask.getId(), null, "自动通过",
|
||||
Collections.emptyList(), assigner, null, null));
|
||||
Collections.emptyList(), assigner, null));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user