Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import javax.annotation.PreDestroy;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import org.apache.commons.collections4.CollectionUtils;
import org.flowable.engine.HistoryService;
Expand Down Expand Up @@ -656,7 +657,10 @@ private FlowInstanceDetailResp cancel(@NotNull FlowInstance flowInstance, Boolea
return FlowInstanceDetailResp.withIdAndType(id, taskTypeHolder.getValue());
}

public FlowInstanceDetailResp approve(@NotNull Long id, String message, Boolean skipAuth) throws IOException {
@Transactional(rollbackFor = Exception.class)
Comment thread
smallsheeeep marked this conversation as resolved.
public FlowInstanceDetailResp approve(@NotNull Long id,
@Size(max = 1024, message = "The approval comment is out of range [0,1024]") String message,
Boolean skipAuth) throws IOException {
TaskEntity taskEntity = getTaskByFlowInstanceId(id);
if (taskEntity.getTaskType() == TaskType.IMPORT && !dispatchChecker.isTaskEntityOnThisMachine(taskEntity)) {
/**
Expand All @@ -681,7 +685,9 @@ public FlowInstanceDetailResp approve(@NotNull Long id, String message, Boolean
}

@Transactional(rollbackFor = Exception.class)
public FlowInstanceDetailResp reject(@NotNull Long id, String message, Boolean skipAuth) {
public FlowInstanceDetailResp reject(@NotNull Long id,
@Size(max = 1024, message = "The approval comment is out of range [0,1024]") String message,
Boolean skipAuth) {
if (notificationProperties.isEnabled()) {
try {
Event event =
Expand Down