diff --git a/processes-services/src/main/java/org/exoplatform/processes/storage/ProcessesStorageImpl.java b/processes-services/src/main/java/org/exoplatform/processes/storage/ProcessesStorageImpl.java index d386039c2..bc623aa3b 100644 --- a/processes-services/src/main/java/org/exoplatform/processes/storage/ProcessesStorageImpl.java +++ b/processes-services/src/main/java/org/exoplatform/processes/storage/ProcessesStorageImpl.java @@ -145,6 +145,8 @@ public WorkFlow saveWorkFlow(WorkFlow workFlow, long userId) throws IllegalArgum } else if (illustrativeAttachment != null && illustrativeAttachment.isToDelete()) { workFlowEntity.setIllustrationImageId(null); } + workFlowEntity.setModifiedDate(new Date()); + workFlowEntity.setModifierId(userId); if (workFlow.getId() == 0) { workFlowEntity.setId(null); workFlowEntity.setCreatedDate(new Date()); @@ -181,8 +183,6 @@ public WorkFlow saveWorkFlow(WorkFlow workFlow, long userId) throws IllegalArgum workFlowEntity.setParticipator(workFlowDAO.find(workFlowEntity.getId()).getParticipator()); } workFlowEntity.setManager(getManagers(workFlow.getRequestsCreators())); - workFlowEntity.setModifiedDate(new Date()); - workFlowEntity.setModifierId(userId); workFlowEntity = workFlowDAO.update(workFlowEntity); } processesAttachmentService.linkAttachmentsToEntity(workFlow.getAttachments(), @@ -515,6 +515,7 @@ public Work saveWorkDraft(Work work, long userId) { throw new IllegalArgumentException("identity is not exist"); } WorkEntity workEntity = EntityMapper.toEntity(work); + workEntity.setModifiedDate(new Date()); if (work.getId() == 0) { workEntity.setId(null); workEntity.setCreatedDate(new Date()); @@ -527,7 +528,6 @@ public Work saveWorkDraft(Work work, long userId) { WORK_DRAFT_ENTITY_TYPE, work.getWorkFlow().getProjectId()); } else { - workEntity.setModifiedDate(new Date()); workEntity = workDraftDAO.update(workEntity); }