Web applications
To enable the Web Applications you can use the following starter in your pom.xml
:
<dependency>
<groupId>org.cibseven.bpm.springboot</groupId>
<artifactId>cibseven-bpm-spring-boot-starter-webapp</artifactId>
<version>1.1.0</version>
</dependency>
By default the application path is /camunda
, so without any further configuration you can access
the Webapps under http://localhost:8080/camunda/app/.
Configurations
You can change the application path with the following configuration property in your application.yaml
file:
camunda.bpm.webapp.application-path=/my/application/path
By default, the starter registers a controller to redirect /
to Camunda’s bundled index.html
.
To disable this, you have to add to your application properties:
camunda.bpm.webapp.index-redirect-enabled=false
Error Pages
The default error handling coming with the Spring Boot (‘whitelabel’ error page) is enabled in the starter. To switch to the Camunda error pages (webjar/META-INF/resources/webjars/camunda/error-XYZ-page.html
), please put them to the application folder structure under /src/main/resources/public/error/XYZ.html
.
Building Custom REST APIs
The Camunda Web Applications use a CSRF Prevention Filter
that expects a CSRF Token
on any
modifying request for paths beginning with /camunda/api/
or /camunda/app/
. Any modifying requests
mapped to these paths will fail, and the current session will be ended if no CSRF Token is present.
You can avoid this by registering your resources on different paths or add your resources to the
CSRF Prevention Filter Whitelist (via the configuration property camunda.bpm.webapp.csrf.entry-points
).