Skip to content

Commit b5b8807

Browse files
committed
MODWRKFLOW-69: Preserve original checksum and created on date on activate/deactivate.
A likely better design is to just get the success/failure and control the model locally. This would require just updating the desired fields. However, doing this would require more massive changes.
1 parent e23f71c commit b5b8807

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

service/src/main/java/org/folio/rest/workflow/service/WorkflowEngineService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,13 @@ private Workflow sendWorkflowRequest(WorkflowDto workflow, String requestPath, S
254254

255255
if (responseWorkflow != null) {
256256
String deploymentId = responseWorkflow.getDeploymentId();
257+
Boolean active = responseWorkflow.getActive();
257258

259+
responseWorkflow.setChecksum(workflow.getChecksum());
260+
responseWorkflow.setCreatedOn(workflow.getCreatedOn());
258261
responseWorkflow.setUpdatedOn(Instant.now());
259-
LOG.info(String.format("Workflow is active = %s, deploymentID = %s", Boolean.TRUE.equals(responseWorkflow.getActive()), deploymentId));
262+
263+
LOG.info(String.format("Workflow is active = %s, deploymentID = %s", Boolean.TRUE.equals(active), deploymentId));
260264
return workflowRepo.save(responseWorkflow);
261265
}
262266
}

0 commit comments

Comments
 (0)