I am trying to use embedded forms with a start event with the Camunda spring boot starter.
My startEvent is described like this:
<bpmn:startEvent id="StartEvent_1" name="Rechnungseingang" camunda:formKey="embedded:app:forms/rechnungseingang.html">
<bpmn:outgoing>SequenceFlow_0dtfc1a</bpmn:outgoing>
</bpmn:startEvent>
The form itself is located under "src/main/webapp/forms/rechnungseingang.html", from my understanding this should be the correct path.
If I try to start the process after starting the spring boot app, I am receiving the error: "Form failure: The context path is either empty or not defined."
In the browser console, I can see a request to http://localhost:8080/test/api/engine/engine/default/process-definition/Rechnungseingang:1:927f0aa4-e590-11e7-973d-e2cbd8678b9f/startForm with the response:
{"key":"embedded:app:forms/rechnungseingang.html","contextPath":null}
Obviously the application can't handle the null value in the contextPath. How am I able to set the contextPath for Camunda in Spring Boot? In the application.properties I already tried to set server.context-path
with no effect.
To start building a form, log in to your Camunda Platform 8 account or open Desktop Modeler and take the following steps: Click on the Modeler tab at the top of the page or alternatively open the File menu in Desktop Modeler. Open any project from your Web Modeler home view. Click the blue New button and choose Form.
Enter URL http://localhost:8080/h2-console in the browser. Enter the JDBC URL and connect to see the Camunda Database where all the tables can be seen.
1.) there is no src/main/webapp with spring boot applications, use src/main/resources/static
2.) for camunda to link the resource to the engine, you will need a process application. This is done easily by adding "@EnableProcessApplication" to your spring boot app.
3.) Autodeployment requires a src/main/resources/META-INF/processes.xml file, but you can leave it empty
4.) there is a full example for embedded forms with camunda spring boot here: https://github.com/camunda/camunda-bpm-examples/tree/master/spring-boot-starter/example-twitter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With