Merge remote-tracking branch 'refs/remotes/origin/REQ-2324' into feature/merged_all_req
This commit is contained in:
commit
0a3942a282
@ -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);
|
||||
|
||||
@ -53,6 +53,7 @@ public class ApproveErrorReporterEventListener implements BpmnAsyncJobEventListe
|
||||
|
||||
@Override
|
||||
public void notify(FlowableEvent flowableEvent) {
|
||||
log.info("ApproveErrorReporterEventListener-flowableEvent: {}", JSONUtil.toJsonStr(flowableEvent));
|
||||
if (!(flowableEvent instanceof FlowableEntityExceptionEventImpl)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
import static org.flowable.common.engine.api.delegate.event.FlowableEngineEventType.JOB_EXECUTION_FAILURE;
|
||||
import static org.flowable.common.engine.api.delegate.event.FlowableEngineEventType.JOB_MOVED_TO_DEADLETTER;
|
||||
|
||||
/**
|
||||
* 异步任务执行异常的扩展监听器
|
||||
@ -33,7 +33,7 @@ public class ErrorReporterEventListener implements BpmnAsyncJobEventListener {
|
||||
|
||||
@Override
|
||||
public boolean support(FlowableEngineEventType eventType) {
|
||||
return Objects.equals(JOB_EXECUTION_FAILURE, eventType);
|
||||
return Objects.equals(JOB_MOVED_TO_DEADLETTER, eventType);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -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