5. Two topics in one worker
• Works well
• Topic 1
• Topic 2
// do nothing
try {
Thread.sleep(10000);
} catch (InterruptedException e) {}
// do nothing
try {
Thread.sleep(15000);
} catch (InterruptedException e) {}
6. Lets start with small steps
10 seconds 15 seconds
How long do a lot of instances take?
7. Try spring boot
• Production ready: only
• Works, but
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp-ee</artifactId>
<version>${camundaSpringBoot.version}</version>
</dependency>
8. Try spring boot 2
• Production ready: only
• Works!
• Work on tasks ASAP!
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
<version>${camundaSpringBoot.version}</version>
</dependency>
That‘s Long Polling
9. Secure the REST-API
@Bean
public FilterRegistrationBean<ProcessEngineAuthenticationFilter> myFilterRegistration() {
FilterRegistrationBean<ProcessEngineAuthenticationFilter> registration =
new FilterRegistrationBean<ProcessEngineAuthenticationFilter>();
registration.setFilter(new ProcessEngineAuthenticationFilter());
registration.addUrlPatterns("/rest/*");
registration.addInitParameter("authentication-provider",
"org.camunda.bpm.engine.rest.security.auth.impl.HttpBasicAuthenticationProvider");
registration.setName("camunda-auth");
registration.setOrder(1);
return registration;
}
ExternalTaskClient client = ExternalTaskClient.create()
...
.addInterceptor(new BasicAuthProvider(externalTaskConfig.getUsername(), externalTaskConfig.getPassword()))
...
.build();
Call it with username and password
10. Start a process instance
10 seconds 15 seconds
Every 2 seconds