diff --git a/core/src/main/java/com/netflix/conductor/core/config/Configuration.java b/core/src/main/java/com/netflix/conductor/core/config/Configuration.java index 386303864c..217a4aa06a 100644 --- a/core/src/main/java/com/netflix/conductor/core/config/Configuration.java +++ b/core/src/main/java/com/netflix/conductor/core/config/Configuration.java @@ -141,7 +141,7 @@ public interface Configuration { int S3_ARCHIVAL_BUCKET_PREFIX_NUM_CHARACTERS_DEFAULT_VALUE = 8; String ARCHIVE_UNSUCCESSFUL_ONLY_PROPERTY_NAME = "workflow.archive.unsuccessful.only"; - boolean ARCHIVE_UNSUCCESSFUL_ONLY_DEFAULT_VALUE = false; + boolean ARCHIVE_UNSUCCESSFUL_ONLY_DEFAULT_VALUE = true; enum ArchivalType { ELASTICSEARCH, S3 @@ -184,7 +184,7 @@ default ArchivalType getWorkflowArchivalType() { /** * @return if true(not default), archives only unsuccessful workflows */ - default boolean shouldArhivelOnlyUnsuccessfulWorkflows() { + default boolean shouldArchivalOnlyUnsuccessfulWorkflows() { return getBooleanProperty(ARCHIVE_UNSUCCESSFUL_ONLY_PROPERTY_NAME, ARCHIVE_UNSUCCESSFUL_ONLY_DEFAULT_VALUE); } diff --git a/core/src/main/java/com/netflix/conductor/core/orchestration/ExecutionDAOFacade.java b/core/src/main/java/com/netflix/conductor/core/orchestration/ExecutionDAOFacade.java index 39ed69980c..03e3a42a55 100644 --- a/core/src/main/java/com/netflix/conductor/core/orchestration/ExecutionDAOFacade.java +++ b/core/src/main/java/com/netflix/conductor/core/orchestration/ExecutionDAOFacade.java @@ -274,7 +274,7 @@ private void removeWorkflowIndex(Workflow workflow , boolean archiveWorkflow) th // Only allow archival if workflow is in terminal state // DO NOT archive async, since if archival errors out, workflow data will be lost // Only archive unsuccessful workflows if enabled - if (!config.shouldArhivelOnlyUnsuccessfulWorkflows() || !workflow.getStatus().isSuccessful()) { + if (!config.shouldArchivalOnlyUnsuccessfulWorkflows() || !workflow.getStatus().isSuccessful()) { workflowArchiver.archiveWorkflow(workflow); } } else {