|
|
|
|
@ -43,7 +43,8 @@ public class WorkFlowService {
|
|
|
|
|
WorkflowEntity existing = workflowRepository.findById(workflow.getId())
|
|
|
|
|
.orElseThrow(() -> new IllegalArgumentException("워크플로우가 존재하지 않습니다. id=" + workflow.getId()));
|
|
|
|
|
Integer maxVersion = existing.getVersion();
|
|
|
|
|
workflow.setVersion(maxVersion != null ? maxVersion + 1 : 1); }
|
|
|
|
|
workflow.setVersion(maxVersion != null ? maxVersion + 1 : 1);
|
|
|
|
|
}
|
|
|
|
|
return workflowRepository.save(workflow);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|