Forked from berndruecker/CamundaSpringBootConfigs.java
Created
April 25, 2019 07:07
-
-
Save schatterjee4/2761aeed5b06be29b521249778e03324 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class CamundaEngineHistoryConfiguration extends AbstractCamundaConfiguration implements CamundaHistoryLevelAutoHandlingConfiguration { | |
@Override | |
public void preInit(SpringProcessEngineConfiguration configuration) { | |
configuration.setHistory(ProcessEngineConfiguration.HISTORY_FULL); | |
} | |
} | |
/** | |
* Use {@link StrongUuidGenerator} to avoid potential problems in cluster environments with {@link DbIdGenerator} | |
* Make sure that you have this on the classpath: | |
<dependency> | |
<groupId>com.fasterxml.uuid</groupId> | |
<artifactId>java-uuid-generator</artifactId> | |
</dependency> | |
*/ | |
@Configuration | |
public class CamundaIdGeneratorConfiguration extends AbstractCamundaConfiguration implements CamundaHistoryLevelAutoHandlingConfiguration { | |
@Override | |
public void preInit(SpringProcessEngineConfiguration configuration) { | |
configuration.setIdGenerator(new StrongUuidGenerator()); | |
} | |
} | |
@Configuration | |
public class CamundaDisableJpaConfig { | |
@Bean | |
public ProcessEngineConfigurationImpl processEngineConfigurationImpl(List<ProcessEnginePlugin> processEnginePlugins) { | |
final SpringProcessEngineConfiguration configuration = new SpringProcessEngineConfiguration() { | |
protected void initJpa() { | |
// disable JPA completely to avoid problems with JPAVariableSerializer | |
} | |
}; | |
configuration.setProcessEnginePlugins(processEnginePlugins); | |
return configuration; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment