I am actually not trying to replay the bug but rather trying to get to the point where my form is actually working. However it does not seem to work so I fall into this bug actually.
I have a startEvent with a camunda:formKey="embedded:app:forms/request-loan.html" and I created a form in src/main/webapp/forms/request-loan.html .
But when I try to load the form I get the Loading… message forever and the following JavaScript error.
15:56:16,006 "Error: Access to restricted URI denied
[41]</f.prototype.end@http://xxx:8080/camunda/app/tasklist/scripts/deps.js:12:23847
[...]
[41]</f.prototype.end/n.onreadystatechange@http://xxx:8080/camunda/app/tasklist/scripts/deps.js:12:23263
I tried to debug the JavaScript to see which URI is denied access to … but hum it’s a bit hard to read …
you should be able to see the URL which is denied in the network tab in of your browsers development tools. Other than that if you could provide your example project we could try to reproduce this behavior.
thanks for sharing the source code. I build it and deployed it to the camunda 7.4.0 tomcat distro. I can start the process with the start form and complete all user forms. It than fails in the freemarker template cause the variable Montant is not known.
I’m not sure what your problem is but maybe you could try to clear your browser cache. Or test the process in incognito mode?
Do you get any stacktrace on the client or server side? Did you configured something different in tomcat than the distro shipped by Camunda?
You see the null contextPath. Which is failing the loading of the form.
So now I wonder if it’s approriate to have two rest apis, one on /engine-rest and the other one on /camunda/api/engine/ because it seems to be my problem and that seems to lead to the null contextPath.
Which webapp artifact do you use, the standalone version (that contains the process engine libraries and a process engine configuration) or the version that works with a shared process engine (and does not contain the process engine libraries)?
Going from the Camunda web application’s root folder, is there a file named WEB-INF/lib/camunda-engine-{VERSION}.jar? As an alternative, do you remember where you downloaded it from?
You are mixing two architectural layouts you can employ Camunda in: As a container-shared and as an application-embedded process engine. See the documentation for a rough overview.
In your case, you use process applications and the REST API that employ a container-shared engine. This engine also manages a set of process application registrations, that means it knows which process application contains the forms for which process deployment. On the other hand, the embedded engine in the webapplication is not aware of these registrations and therefore not able to resolve the context path to your form.
To resolve this problem, you should NOT use the embedded web application in this scenario. Make sure to use the web application that is contained in the Camunda Tomcat distribution. This application will participate by using a shared engine and is therefore able to access the process application registrations. Then, you will also be able to use the REST API embedded in the web application for your requests.