I installed the camunda standalone webapplication file (camunda-webapp-tomcat-standalone-7.12.0.war) to a vanilla tomcat 9.0 instance. I configured a mariadb database and ldap. Worked like a charm. Aditionally I installed the engine-rest. Then I created a project from camunda archetype (camunda-archetype-servlet-war-7.11.1). The project contains a class that extends ServletProcessApplication, has the annotation @ProcessApplication and has an empty implementation. It has a minimal processes.xml, the processes (under src/main/resources) and forms (under src/main/webapps/forms). I built the project and deployed it to the tomcat. I can start processes via REST and inspect them in the cockpit. The only thing that doesnt work is the tasklist. I open a user task in the tasklist and an error is displayed:
Form failure: The context path is either empty or not defined.
I used the form key “embedded:app:forms/categorize-manually.html” in my process.
I went through the existing topics in the forum regarding the error but none of them seemed to help. I thought that the forms should be auto-deployed like the processes but this seems to not be the case. Do I have to manually deploy the forms in my ServletProcessApplication class?
Hello Luke
1.
check that maven build put it correct inside war. For example: <your-applicaiton>.war/forms/categorize-manually.html
2. open tomcat admin and verify context path of your deployed application. Did you redefine context path in tomcat specific configuration like context.xml?
It is correctly put up and I can access it via browser via server//forms/categorize-manually.html
Where my-application is the name of my war-file (without the file ending). So this is correct.
In the context.xml there are only WatchedResource-tags. The only thing I remember to do with a context is to add a “docBase” to access images in a folder in the form. I can then access a local folder with images via “/img/1234.png”. But that should not interfere in any way.
Thanks roman for looking into this.
Edit: How can I check that the resolution of “embedded:app” links to “”. In my understanding the contextPath is resolved to “”. Is it correct that the camunda applications start the shared engine and my application is using it? Then how does the engine started by camunda know that my app even exists? -> Because the ProcessApplication links to the “default” engine which is started by camunda. The linkage should be correct because the processes from my-application are deployed to the default engine. -> Is that true? How can I be sure that my-application does not start a second engine and that is why the form lives in the second engine and cant be accessed by the camunda engine?
Annotation @ProcessApplication setup default configuration for bootsraping your applicaiton. It check process.xml (src\main\resources\META-INF\processes.xml ) and connect your application to default engine as default and make a BPMN resource deployment if isScanForProcessDefinitions should be set to true. It setup a classloader for loading your resources.
Did you sure, that you ServletProcessApplication is called at all? If don’t register it as listener in web.xml
Try to override method ServletProcessApplication.getServletContext() at your ProcessApplication and check what kind of servlet-context is retrived. Try to inspect the same way ServletProcessApplication.getProcessApplicationClassloader() as well.
Did you re-define any attributes in @ProcessApplication? Try to remove them.
This is a good point to check, that you have a shared engine (not a second engine) . Verify that maven dependecy in your project for camunda-engine, camunda-engine-dmn set to provided. camunda-engine.jar should not be packed with yout application in WEB-INF/lib.
Good luck
Roman
Switch on logger for org.camunda.bpm.application to TRACE.