diff --git a/archive/src/main/java/io/orkes/conductor/dao/postgres/archive/PostgresArchiveDAO.java b/archive/src/main/java/io/orkes/conductor/dao/postgres/archive/PostgresArchiveDAO.java index 1c4624e..43f09c5 100644 --- a/archive/src/main/java/io/orkes/conductor/dao/postgres/archive/PostgresArchiveDAO.java +++ b/archive/src/main/java/io/orkes/conductor/dao/postgres/archive/PostgresArchiveDAO.java @@ -103,10 +103,8 @@ public void createOrUpdateWorkflow(WorkflowModel workflow) { indx++, connection.createArrayOf("text", indexData.toArray(new String[0]))); statement.setString(indx++, workflow.getCreatedBy()); - String workflowJson = null; - if (workflow.getStatus().isTerminal()) { - workflowJson = objectMapper.writeValueAsString(workflow); - } + String workflowJson = objectMapper.writeValueAsString(workflow); + statement.setString(indx++, workflowJson); // Update values statement.setLong(indx++, updatedTime);