Embedded Forms

So, I have constructed an Embedded Spring Boot application, where we grab a dependency that brings a bpmn.xml and the forms it needs using maven-dependency-plugin.

It works fine if the bpmn.xml has embedded:app:form.html and if I execute the bpmn process from the task list. So it means the application finds its way through the dependency to use both the bpmn.xml and form.html.
{ contextPath: "/" key: "embedded:app:form.html" }

Now the problem is that if I deploy the same bpmn.xml from the modeler, and execute it from the task list, I get " Form failure: The context path is either empty or not defined."
{ contextPath: null key: "embedded:app:form.html" }

Now if I go the modeler and change embedded:app to embedded:deployment I get **Form failure:** The form with the resource name 'form.html' cannot be found in deployment.
{ contextPath: null key: "embedded:deployment:form.html" }

Is there a general embedded:[global] that can find within the app?

Thanks in advance!

Hi @Nuno_Ribeiro,

You can set the form key to embedded:/path/to/form.html which would then load the form relative to the container’s context path, e.g. localhost:8080/path/to/form.html for the default Camunda distributions. That allows you deploy a Java web application that contains all the forms and that you can access from all the processes.

Cheers,
Thorben

Thank you. This works for me. But, is this a good practice to deploy the forms to the camunda engine web container ?

Hi @shkrish,

it depends how you package your processes into an application. If you use the shared engine on an application server, it is easier to maintain them as part of the deployed war file (https://docs.camunda.org/manual/latest/user-guide/process-applications/).

If you use the spring boot integration, you get a single process application per container. As the application uses the root of the server, you can reference the forms directly from there (without the app in the formkey).

Best practice? Hard to decide, you can use what fits best to you.

Hope this helps, Ingo