Comments (8)
I would suggest to raise a support ticket
from camunda-bpm-spring-boot-starter.
Hi.
IMHO: never tried that. Could you please provide an example project (on github)?
Am 07.02.2016 um 10:47 schrieb Kiyan Ahmadizadeh [email protected]:
Hello,
I've been working on an application using the webapp starter, and have been trying to get an embedded form to work. My project structure is very similar to the one found in examples/camunda-spring-boot-starter-example-webapp. I tried creating a folder src/main/webapp/forms with a file greetingForm.html , and modifying sample.bpmn so that the user task "do something" has form key app:embedded:forms/greetingForm.html, but I get a CORS error displayed when trying to view the form in the Tasklist.
We experienced a similar problem with a non-spring-boot Camunda project, and the issue went away when we used an META-INF/process.xml without any configuration, like:
default
but the same approach doesn't seem to work here. The problem seems to involve the contextPath being null in the response below, which is obtained by tasklist app when using the API endpoint /api/engine/engine/default/task/1408{"key":"embedded:app:forms/greetingForm.html","contextPath":null}
Can embedded forms work with the spring boot webapp starter? Is this a bug, pending feature, or something I'm missing? Thanks!—
Reply to this email directly or view it on GitHub.
from camunda-bpm-spring-boot-starter.
Sure! Please checkout my fork of the repo, branch embedded-forms
off tag 1.1.0
(the version we're using, but this same problem exists on master
).
examples/camunda-spring-boot-starter-example-webapp
has been modified so that sample.bpmn
uses an embedded form in the "do something" task. The form is located at src/main/webapp/greetingForm.html
. If you start the example with mvn spring-boot:run
, make your way to the tasklist, start the Sample
process, and click on the task that's assigned to you when the process starts (I use the notification about the task being assigned to me that pops up in the bottom right) you encounter the error.
Thanks for the help!
from camunda-bpm-spring-boot-starter.
If it helps, I'm working off of this example from the Camunda docs.
from camunda-bpm-spring-boot-starter.
We have a workaround, but I tracked down more of an exact cause using my debugger and wanted to share. Because there is no process engine application (sometimes called a process archive) associated with the SpringAutoDeployment, the context path for the application cannot be retrieved, and this results in the embedded form key not being translated.
More precisely, the relevant portion of the call stack in Camunda 7.4 looks like:
....
ManagementServiceImpl#getProcessApplicationForDeployment(String): 86
ApplicationContextPathUtil#getApplicationPathForDeployment(ProcessEngine, String): 42
TaskResourceImpl#getForm(): 197
The TaskResourceImpl
tries to set the context path in the FormDto
that gets returned as the response to the task form endpoint. ApplicationContextPathUtil
tries to retrieve the context path by querying the ManagementServiceImpl
for the process application name. The management service returns null
for the process application name, because there is no process application associated with the deployment. As a result, ApplicationContextPathUtil
returns null
for the context path, this is what gets set in the FormDto
, and as a result the frontend cannot translate the form key into an actual URL.
If it were possible to associate a process application / process archive with the auto-created deployment, I believe that would resolve the issue.
Hope this helps. Please at-me if I can answer any questions.
from camunda-bpm-spring-boot-starter.
I think it would be a good idea to use an ProcessApplication, see
https://forum.camunda.org/t/formkey-resolve-embedded-app-fails-with-spring-boot/479
https://docs.camunda.org/manual/7.4/user-guide/process-applications/the-process-application-class/#the-embeddedprocessapplication
This might also solve #53 ... we just use processapplication.deploy instead of implementing our own resource-parser
from camunda-bpm-spring-boot-starter.
Fixed by #76
Using the SpringBootProcessApplication
@SpringBootApplication
public class MyApp extends SpringBootProcessApplication {}
fixes this issue by adding a servletContextPath="/"
property to the application which is used by the formService to resolve the ":app:" identifier.
from camunda-bpm-spring-boot-starter.
Well, the same problem occurs for me when using Spring Boot 2.0.2, but setting server.servlet.contextPath doesn't fix it for me. I don't even get an error in my server log, just an invalid HTTP request to http://localhost:8080/forms/ergebnis-lesen.html?noCache=1529563649812&taskId=f5ddea46-751e-11e8-870f-aced5cb84e54&userId=demo
I am using the camunda-bpm-spring-boot-starter-webapp-ee with version 3.0.0.
from camunda-bpm-spring-boot-starter.
Related Issues (20)
- spring boot ee - index.html not found HOT 1
- Make AuthenticationFilter registration configurable HOT 1
- Script Task log output HOT 1
- Readme Examples link leads to 404 HOT 2
- Gradle examples have been removed? HOT 2
- Cannot resolve identifier 'myDelegateName' in 1/3 of my instances everyday.
- Pattern for multiple "process applications"? HOT 2
- The table-perfix property not work. HOT 2
- Spring Boot 2.1.0.RELEASE not supported! required a bean of type 'org.camunda.bpm.engine.ProcessEngine' that could not be found HOT 8
- "invalid date value "+propertyValue HOT 1
- Camunda bpmn with mockbean, not detecting Java class instance HOT 6
- delegate response is slow HOT 2
- Is JDK8 OK? HOT 1
- camunda sql exception!!!
- How can I get extension property through API?
- Intégration camunda HOT 1
- Simple dmn file showing error.. HOT 1
- Camunda webapp css and js dose not load in my spring boot app HOT 5
- camunda-bpm-spring-boot-starter-rest uses commons-io v2.5 with reported CVE Vulnaribilty CVE-2021-29425
- Hosted link does not work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from camunda-bpm-spring-boot-starter.