From af0c5c4b5a4e18a497e5fb7a2803c195013fe171 Mon Sep 17 00:00:00 2001 From: Manan Bhatt Date: Sun, 5 Nov 2023 10:15:57 +0530 Subject: [PATCH] Index running workflow. (#45) Co-authored-by: manan164 <1897158+manan164@users.noreply.github.com> --- .../conductor/dao/postgres/archive/PostgresArchiveDAO.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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);