This is an automated email from the ASF dual-hosted git repository.
arnold pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new 8c7e417c5 FINERACT-1744 - [x] Purge Processed Commands Jobs - [x]
Refactor CommandProcessingResultType to CommandProcessingStatus
8c7e417c5 is described below
commit 8c7e417c5de080f610c497bf885e8b09e55a2689
Author: Janos Haber <[email protected]>
AuthorDate: Mon Nov 28 16:37:41 2022 +0100
FINERACT-1744
- [x] Purge Processed Commands Jobs
- [x] Refactor CommandProcessingResultType to CommandProcessingStatus
---
.../commands/domain/CommandSourceRepository.java | 7 ++
.../jobs/PurgeProcessedCommandsConfig.java | 52 ++++++++++++
.../jobs/PurgeProcessedCommandsTasklet.java | 54 ++++++++++++
.../domain/ConfigurationDomainService.java | 2 +
.../domain/ConfigurationDomainServiceJpa.java | 9 ++
.../infrastructure/jobs/service/JobName.java | 3 +-
.../jobs/service/StepName.java} | 11 +--
.../db/changelog/tenant/changelog-tenant.xml | 1 +
.../0075_add_processed_commands_purge_job.xml | 59 +++++++++++++
.../jobs/PurgeProcessedCommandsTaskletTest.java | 97 ++++++++++++++++++++++
.../common/GlobalConfigurationHelper.java | 13 ++-
11 files changed, 296 insertions(+), 12 deletions(-)
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/commands/domain/CommandSourceRepository.java
b/fineract-provider/src/main/java/org/apache/fineract/commands/domain/CommandSourceRepository.java
index 1977c6ede..13b6affbb 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/commands/domain/CommandSourceRepository.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/commands/domain/CommandSourceRepository.java
@@ -18,11 +18,18 @@
*/
package org.apache.fineract.commands.domain;
+import java.time.LocalDate;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
public interface CommandSourceRepository extends JpaRepository<CommandSource,
Long>, JpaSpecificationExecutor<CommandSource> {
CommandSource findByActionNameAndEntityNameAndIdempotencyKey(String
actionName, String entityName, String idempotencyKey);
+ @Modifying(flushAutomatically = true)
+ @Query("delete from CommandSource c where c.status = :status and
c.madeOnDate is not null and c.madeOnDate <= :dateForPurgeCriteria")
+ void deleteOlderEventsWithStatus(CommandProcessingResultType status,
LocalDate dateForPurgeCriteria);
+
}
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsConfig.java
b/fineract-provider/src/main/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsConfig.java
new file mode 100644
index 000000000..90e389ffb
--- /dev/null
+++
b/fineract-provider/src/main/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsConfig.java
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.commands.jobs;
+
+import org.apache.fineract.infrastructure.jobs.service.JobName;
+import org.apache.fineract.infrastructure.jobs.service.StepName;
+import org.springframework.batch.core.Job;
+import org.springframework.batch.core.Step;
+import
org.springframework.batch.core.configuration.annotation.JobBuilderFactory;
+import
org.springframework.batch.core.configuration.annotation.StepBuilderFactory;
+import org.springframework.batch.core.launch.support.RunIdIncrementer;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class PurgeProcessedCommandsConfig {
+
+ @Autowired
+ private JobBuilderFactory jobs;
+ @Autowired
+ private StepBuilderFactory steps;
+ @Autowired
+ private PurgeProcessedCommandsTasklet tasklet;
+
+ @Bean
+ protected Step purgeProcessedCommandsStep() {
+ return
steps.get(StepName.PURGE_PROCESSED_COMMANDS_STEP.name()).tasklet(tasklet).build();
+ }
+
+ @Bean
+ public Job purgeProcessedCommandsJob() {
+ return
jobs.get(JobName.PURGE_PROCESSED_COMMANDS.name()).start(purgeProcessedCommandsStep()).incrementer(new
RunIdIncrementer())
+ .build();
+ }
+}
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsTasklet.java
b/fineract-provider/src/main/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsTasklet.java
new file mode 100644
index 000000000..92cfac681
--- /dev/null
+++
b/fineract-provider/src/main/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsTasklet.java
@@ -0,0 +1,54 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.commands.jobs;
+
+import java.time.LocalDate;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.fineract.commands.domain.CommandProcessingResultType;
+import org.apache.fineract.commands.domain.CommandSourceRepository;
+import
org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService;
+import org.apache.fineract.infrastructure.core.service.DateUtils;
+import org.springframework.batch.core.StepContribution;
+import org.springframework.batch.core.scope.context.ChunkContext;
+import org.springframework.batch.core.step.tasklet.Tasklet;
+import org.springframework.batch.repeat.RepeatStatus;
+import org.springframework.stereotype.Component;
+
+@Slf4j
+@AllArgsConstructor
+@Component
+public class PurgeProcessedCommandsTasklet implements Tasklet {
+
+ private final CommandSourceRepository repository;
+ private final ConfigurationDomainService configurationDomainService;
+
+ @Override
+ public RepeatStatus execute(StepContribution contribution, ChunkContext
chunkContext) {
+ try {
+ Long numberOfDaysForPurgeCriteria =
configurationDomainService.retrieveProcessedCommandsPurgeDaysCriteria();
+ LocalDate dateForPurgeCriteria =
DateUtils.getBusinessLocalDate().minusDays(numberOfDaysForPurgeCriteria);
+
repository.deleteOlderEventsWithStatus(CommandProcessingResultType.PROCESSED,
dateForPurgeCriteria);
+ } catch (Exception e) {
+ log.error("Error occurred while purging processed commands: ", e);
+ }
+ return RepeatStatus.FINISHED;
+ }
+
+}
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainService.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainService.java
index b025e0813..e3ac140e4 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainService.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainService.java
@@ -121,6 +121,8 @@ public interface ConfigurationDomainService {
Long retrieveExternalEventsPurgeDaysCriteria();
+ Long retrieveProcessedCommandsPurgeDaysCriteria();
+
Long retrieveRepaymentDueDays();
Long retrieveRepaymentOverdueDays();
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainServiceJpa.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainServiceJpa.java
index be0e45c88..36fe9e933 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainServiceJpa.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/configuration/domain/ConfigurationDomainServiceJpa.java
@@ -41,6 +41,8 @@ public class ConfigurationDomainServiceJpa implements
ConfigurationDomainService
public static final String ENABLE_BUSINESS_DATE = "enable_business_date";
public static final String ENABLE_AUTOMATIC_COB_DATE_ADJUSTMENT =
"enable_automatic_cob_date_adjustment";
public static final String EXTERNAL_EVENTS_PURGE_DAYS =
"purge-external-events-older-than-days";
+
+ public static final String PROCESSED_COMMANDS_PURGE_DAYS =
"purge-processed-commands-older-than-days";
private static final String DAYS_BEFORE_REPAYMENT_IS_DUE =
"days-before-repayment-is-due";
private static final String DAYS_AFTER_REPAYMENT_IS_OVERDUE =
"days-after-repayment-is-overdue";
private static final String ENABLE_EXTERNAL_ID_AUTO_GENERATION =
"enable-auto-generated-external-id";
@@ -463,6 +465,13 @@ public class ConfigurationDomainServiceJpa implements
ConfigurationDomainService
}
+ @Override
+ public Long retrieveProcessedCommandsPurgeDaysCriteria() {
+ final GlobalConfigurationPropertyData property =
getGlobalConfigurationPropertyData(PROCESSED_COMMANDS_PURGE_DAYS);
+ return property.getValue();
+
+ }
+
@Override
public Long retrieveRepaymentDueDays() {
final GlobalConfigurationPropertyData property =
getGlobalConfigurationPropertyData(DAYS_BEFORE_REPAYMENT_IS_DUE);
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobName.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobName.java
index 1858733e4..2f9e5fb44 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobName.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/JobName.java
@@ -55,7 +55,8 @@ public enum JobName {
LOAN_COB("Loan COB"), //
LOAN_DELINQUENCY_CLASSIFICATION("Loan Delinquency Classification"), //
SEND_ASYNCHRONOUS_EVENTS("Send Asynchronous Events"), //
- PURGE_EXTERNAL_EVENTS("Purge External Events");
+ PURGE_EXTERNAL_EVENTS("Purge External Events"), //
+ PURGE_PROCESSED_COMMANDS("Purge Processed Commands");
private final String name;
diff --git
a/fineract-provider/src/main/java/org/apache/fineract/commands/domain/CommandSourceRepository.java
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/StepName.java
similarity index 64%
copy from
fineract-provider/src/main/java/org/apache/fineract/commands/domain/CommandSourceRepository.java
copy to
fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/StepName.java
index 1977c6ede..2dbac082c 100644
---
a/fineract-provider/src/main/java/org/apache/fineract/commands/domain/CommandSourceRepository.java
+++
b/fineract-provider/src/main/java/org/apache/fineract/infrastructure/jobs/service/StepName.java
@@ -16,13 +16,8 @@
* specific language governing permissions and limitations
* under the License.
*/
-package org.apache.fineract.commands.domain;
-
-import org.springframework.data.jpa.repository.JpaRepository;
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-
-public interface CommandSourceRepository extends JpaRepository<CommandSource,
Long>, JpaSpecificationExecutor<CommandSource> {
-
- CommandSource findByActionNameAndEntityNameAndIdempotencyKey(String
actionName, String entityName, String idempotencyKey);
+package org.apache.fineract.infrastructure.jobs.service;
+public enum StepName {
+ PURGE_PROCESSED_COMMANDS_STEP;
}
diff --git
a/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
b/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
index f9185c1d3..ea5dc17f8 100644
---
a/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
+++
b/fineract-provider/src/main/resources/db/changelog/tenant/changelog-tenant.xml
@@ -94,4 +94,5 @@
<include file="parts/0072_add_result_and status_to_command_source.xml"
relativeToChangelogFile="true" />
<include file="parts/0073_add_result_status_code_to_command_source.xml"
relativeToChangelogFile="true" />
<include file="parts/0074_add_last_cob_business_date_column_to_loan.xml"
relativeToChangelogFile="true"/>
+ <include file="parts/0075_add_processed_commands_purge_job.xml"
relativeToChangelogFile="true" />
</databaseChangeLog>
diff --git
a/fineract-provider/src/main/resources/db/changelog/tenant/parts/0075_add_processed_commands_purge_job.xml
b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0075_add_processed_commands_purge_job.xml
new file mode 100644
index 000000000..35ae9d3ab
--- /dev/null
+++
b/fineract-provider/src/main/resources/db/changelog/tenant/parts/0075_add_processed_commands_purge_job.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-4.3.xsd">
+ <changeSet author="fineract" id="1" context="postgresql">
+ <sql>
+ SELECT SETVAL('c_configuration_id_seq', COALESCE(MAX(id), 0)+1,
false ) FROM c_configuration;
+ </sql>
+ </changeSet>
+ <changeSet author="fineract" id="2">
+ <insert tableName="c_configuration">
+ <column name="name"
value="purge-processed-commands-older-than-days"/>
+ <column name="value" valueNumeric="30"/>
+ <column name="date_value"/>
+ <column name="string_value"/>
+ <column name="enabled" valueBoolean="false"/>
+ <column name="is_trap_door" valueBoolean="false"/>
+ <column name="description" value="Number of days criteria to purge
old processed commands"/>
+ </insert>
+ <insert tableName="job">
+ <column name="name" value="Purge Processed Commands"/>
+ <column name="display_name" value="Purge Processed Commands"/>
+ <column name="cron_expression" value="0 0 1 * * ?"/>
+ <column name="create_time" valueDate="${current_datetime}"/>
+ <column name="task_priority" valueNumeric="5"/>
+ <column name="group_name"/>
+ <column name="previous_run_start_time"/>
+ <column name="job_key" value="Purge Processed Commands _ DEFAULT"/>
+ <column name="initializing_errorlog"/>
+ <column name="is_active" valueBoolean="false"/>
+ <column name="currently_running" valueBoolean="false"/>
+ <column name="updates_allowed" valueBoolean="true"/>
+ <column name="scheduler_group" valueNumeric="0"/>
+ <column name="is_misfired" valueBoolean="false"/>
+ <column name="node_id" valueNumeric="1"/>
+ <column name="is_mismatched_job" valueBoolean="true"/>
+ </insert>
+ </changeSet>
+</databaseChangeLog>
diff --git
a/fineract-provider/src/test/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsTaskletTest.java
b/fineract-provider/src/test/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsTaskletTest.java
new file mode 100644
index 000000000..050438443
--- /dev/null
+++
b/fineract-provider/src/test/java/org/apache/fineract/commands/jobs/PurgeProcessedCommandsTaskletTest.java
@@ -0,0 +1,97 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.fineract.commands.jobs;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.mockito.Mockito.doThrow;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import java.time.LocalDate;
+import java.time.ZoneId;
+import java.util.HashMap;
+import java.util.Map;
+import org.apache.fineract.commands.domain.CommandSourceRepository;
+import org.apache.fineract.infrastructure.businessdate.domain.BusinessDateType;
+import
org.apache.fineract.infrastructure.configuration.domain.ConfigurationDomainService;
+import org.apache.fineract.infrastructure.core.domain.FineractPlatformTenant;
+import org.apache.fineract.infrastructure.core.service.DateUtils;
+import org.apache.fineract.infrastructure.core.service.ThreadLocalContextUtil;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.mockito.junit.jupiter.MockitoExtension;
+import org.springframework.batch.core.StepContribution;
+import org.springframework.batch.core.scope.context.ChunkContext;
+import org.springframework.batch.repeat.RepeatStatus;
+
+@ExtendWith(MockitoExtension.class)
+public class PurgeProcessedCommandsTaskletTest {
+
+ @Mock
+ private CommandSourceRepository repository;
+ @Mock
+ private ConfigurationDomainService configurationDomainService;
+ @Mock
+ private StepContribution stepContribution;
+ @Mock
+ private ChunkContext chunkContext;
+ private RepeatStatus resultStatus;
+ private PurgeProcessedCommandsTasklet underTest;
+
+ @BeforeEach
+ public void setUp() {
+ ThreadLocalContextUtil.setTenant(new FineractPlatformTenant(1L,
"default", "Default", "Asia/Kolkata", null));
+ ThreadLocalContextUtil
+ .setBusinessDates(new
HashMap<>(Map.of(BusinessDateType.BUSINESS_DATE,
LocalDate.now(ZoneId.systemDefault()))));
+ underTest = new PurgeProcessedCommandsTasklet(repository,
configurationDomainService);
+ }
+
+ @Test
+ public void
givenEventsForPurgeWhenTaskExecutionThenEventsPurgeForDaysCriteria() {
+ // given
+ ArgumentCaptor<LocalDate> dateCriteriaCaptor =
ArgumentCaptor.forClass(LocalDate.class);
+
when(configurationDomainService.retrieveProcessedCommandsPurgeDaysCriteria()).thenReturn(2L);
+ // when
+ resultStatus = underTest.execute(stepContribution, chunkContext);
+ // then
+ verify(repository,
times(1)).deleteOlderEventsWithStatus(Mockito.any(), Mockito.any());
+ verify(repository).deleteOlderEventsWithStatus(Mockito.any(),
dateCriteriaCaptor.capture());
+ LocalDate expectedDateForPurgeCriteriaTest =
DateUtils.getBusinessLocalDate().minusDays(2);
+ LocalDate actualDateForPurgeCriteria = dateCriteriaCaptor.getValue();
+ assertEquals(expectedDateForPurgeCriteriaTest,
actualDateForPurgeCriteria);
+ assertEquals(RepeatStatus.FINISHED, resultStatus);
+ }
+
+ @Test
+ public void
givenEventsForPurgeWhenExceptionOccursThenJobExecutionFinishesSuccessfully() {
+ // given
+
when(configurationDomainService.retrieveProcessedCommandsPurgeDaysCriteria()).thenReturn(2L);
+ doThrow(new RuntimeException("Test
Exception")).when(repository).deleteOlderEventsWithStatus(Mockito.any(),
Mockito.any());
+ // when
+ resultStatus = underTest.execute(stepContribution, chunkContext);
+ // then
+ assertEquals(RepeatStatus.FINISHED, resultStatus);
+ }
+
+}
diff --git
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/GlobalConfigurationHelper.java
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/GlobalConfigurationHelper.java
index 4b3866ea7..8cb12c05b 100644
---
a/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/GlobalConfigurationHelper.java
+++
b/integration-tests/src/test/java/org/apache/fineract/integrationtests/common/GlobalConfigurationHelper.java
@@ -98,9 +98,9 @@ public class GlobalConfigurationHelper {
ArrayList<HashMap> expectedGlobalConfigurations =
getAllDefaultGlobalConfigurations();
ArrayList<HashMap> actualGlobalConfigurations =
getAllGlobalConfigurations(requestSpec, responseSpec);
- // There are currently 45 global configurations.
- Assertions.assertEquals(45, expectedGlobalConfigurations.size());
- Assertions.assertEquals(45, actualGlobalConfigurations.size());
+ // There are currently 46 global configurations.
+ Assertions.assertEquals(46, expectedGlobalConfigurations.size());
+ Assertions.assertEquals(46, actualGlobalConfigurations.size());
for (int i = 0; i < expectedGlobalConfigurations.size(); i++) {
@@ -496,6 +496,13 @@ public class GlobalConfigurationHelper {
isAutomaticExternalIdGenerationEnabled.put("trapDoor", false);
defaults.add(isAutomaticExternalIdGenerationEnabled);
+ HashMap<String, Object> purgeProcessCommandDaysDefault = new
HashMap<>();
+ purgeProcessCommandDaysDefault.put("id", 51);
+ purgeProcessCommandDaysDefault.put("name",
"purge-processed-commands-older-than-days");
+ purgeProcessCommandDaysDefault.put("value", 0);
+ purgeProcessCommandDaysDefault.put("enabled", false);
+ purgeProcessCommandDaysDefault.put("trapDoor", false);
+ defaults.add(purgeProcessCommandDaysDefault);
return defaults;
}