Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

i'm running embedded camunda engine in my application. Now i would like to run second camunda engine with cockpit on different container with the same database. What i did is basically copy-paste of my main applciation configuration only switched dependency from camunda-bpm-spring-boot-starter to camunda-bpm-spring-boot-starter-webapp . I can acess cockpits main page but i'm immediately prompted The process engine you are trying to access does not exist and i don't understand why? On startup i can see that my SpringProcessEngineConfiguration bean is created as well as ProcessEngineFactoryBean bean. However:

BpmPlatform.getProcessEngineService().getProcessEngineNames();

returns empty set. Could you please have a look and point my mistake?

main app class:

@SpringBootApplication
public class CamundaCockpitApplication {
public static void main(String[] args) {
    SpringApplication.run(CamundaCockpitApplication.class, args);
    BpmPlatform.getProcessEngineService().getProcessEngineNames();

Camunda confing:

@Configuration
@RequiredArgsConstructor
public class EngineConfiguration {
private final DataSource dataSource;
private final PlatformTransactionManager transactionManager;
private final ResourcePatternResolver resourcePatternResolver;
@Bean
public SpringProcessEngineConfiguration springProcessEngineConfiguration() {
    SpringProcessEngineConfiguration springConfiguration = new SpringProcessEngineConfiguration();
    springConfiguration.setDataSource(dataSource);
    springConfiguration.setTransactionManager(transactionManager);
    springConfiguration.setDatabaseSchemaUpdate("false");
    springConfiguration.setJobExecutorActivate(false);
    springConfiguration.setHistory("full");
    springConfiguration.setJdbcBatchProcessing(false);
    return springConfiguration;
@Bean
public ProcessEngineFactoryBean processEngineFactoryBean() {
    ProcessEngineFactoryBean engine = new ProcessEngineFactoryBean();
    engine.setProcessEngineConfiguration(springProcessEngineConfiguration());
    return engine;
                Try adding @EnableProcessApplication to your main class. The webapp package is probably configured not to start the engine by default.
– NeplatnyUdaj
                Mar 15, 2019 at 13:42
                @NeplatnyUdaj you are correct, this solved my issue, if you post it as answer i will accept it
– Akka Jaworek
                Mar 15, 2019 at 13:48
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.