Skip to content

Commit

Permalink
also make parameters with defaults configurable #87
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteph-de committed Sep 24, 2024
1 parent 29f0e48 commit ffbe9fa
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ public class MCRBPMNMgr {

private static ProcessEngine processEngine;

/**
* initializes Camunda Workflow processEngine from MyCoRe properties
* see https://docs.camunda.org/manual/7.21/user-guide/spring-boot-integration/configuration/
* for documentation, default values and other options
*
* @return the configuration object
*/
public static ProcessEngineConfiguration getWorkflowProcessEngineConfiguration() {
try {
Map<String, String> props = MCRConfiguration2.getSubPropertiesMap(WF_PROCESS_ENGINE_PROPERTIES_PREFIX);
Expand All @@ -86,8 +93,8 @@ public static ProcessEngineConfiguration getWorkflowProcessEngineConfiguration()
}

// default values, currently no support to change via MyCoRe properties
peConf.setHistoryTimeToLive("P7D");
peConf.setDatabaseSchemaUpdate("true");
peConf.setHistoryTimeToLive(props.getOrDefault("HistoryTimeToLive", "P7D"));
peConf.setDatabaseSchemaUpdate(props.getOrDefault("DatabaseSchemaUpdate", "true"));
peConf.setJobExecutorActivate(false);

peConf.getProcessEnginePlugins().add(new MCRMyCoReIDMPlugin());
Expand Down

0 comments on commit ffbe9fa

Please sign in to comment.