Embedded Form does not working with camunda-bpm-webapp

1,979 views
Skip to first unread message

Andrew Kim

unread,
Apr 28, 2015, 5:56:55 PM4/28/15
to camunda-...@googlegroups.com
Hi all,

I'm developing using camunda-bpm-webapp and the remote application which is to manage separately each process for future.

I've tried so many times as below, 
and tried many examples such as camunda-get-started, camunda-get-started-spring and even my own custom spring with jersey, 

But, still not working... does anyone knows this ??
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[1] camunda-bpm-webapp : https://github.com/camunda/camunda-bpm-webapp (BUILD OK, working well)

[3] Deploy [1],[2] war files to glassfish after that [1], [2] are working fine, but..

but it's not working  "Embedded Task Forms"
([2]'s task form is working well in distribution version for Glassfish)

This problem & error message are almost same with my before question as https://groups.google.com/forum/#!topic/camunda-bpm-users/05_mdxKqw3I
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Then, do I have to use only distribution version as below ?? this is only way to custom build for camunda ??

[ex. glassfish distribution and mysql]
[1] camunda-bpm-platform
[2] camunda-engine-rest-7.3.0-alpha3
[3] camunda-jobexecutor-rar
[4] camunda-webapp-glassfish-7.3.0-alpha3 <<-- Frontend, BackEnd customize ??
[5] my own custom class                           <<-- remote application for custom class ??

Sebastian Stamm

unread,
Apr 29, 2015, 4:46:41 AM4/29/15
to camunda-...@googlegroups.com
Hi Andrew,

I am not sure I understand your problem correctly. Where are you putting the HTML file for your embedded form and what URL does the browser request when you try to access the embedded form? (You can get this information via the network tab of the chrome console)

Cheers
Sebastian

Andrew Kim

unread,
Apr 29, 2015, 10:06:21 AM4/29/15
to camunda-...@googlegroups.com
Hi Sebastian, 

My problem was as below, in detail, 

     -> 1.changed db configuration and source build (mvn clean install -DskipTests)
     -> 2.build and deploy to glassfish 
           (<workspace>\camunda-bpm-webapp\distro\glassfish-standalone\target\camunda-webapp-glassfish-standalone-7.3.0-SNAPSHOT.war)
     -> 3.working fine so far

    -> 1.changed camunda version in pom.xml and db configuration in applicationContext.xml
    -> 2.build and deploy to glassfish
    -> 3.check cockpit and tasklist working ok so far..
    -> 4.creat the embedded task form that form key is like "embedded:app:forms/request-loan.html" in loanApproval.bpmn
        (form file location : /src/main/webapp/forms/request-loan.html)
    -> 5.rebuild and redeploy to glassfish after that,
           --> 5-1. click "start process" in tasklist
           --> 5-2. click "loan-approval" what you made
           --> 5-3. loading message appear and does not working.

- my error messages as below,
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[Chrome console]

XMLHttpRequest cannot load app:forms/request-loan.html?noCache=1430176670773. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.35.p.end @ camunda-bpm-sdk-angular.js:66615.l.load @ camunda-bpm-sdk-angular.js:542n.factory.e.forEach.s.(anonymous function) @ index.js:7922.CamundaForm.initialize @ camunda-bpm-sdk-angular.js:3287CamundaForm @ camunda-bpm-sdk-angular.js:325920.i.extend.n @ camunda-bpm-sdk-angular.js:2968l @ cam-tasklist-form-embedded.js:73(anonymous function) @ cam-tasklist-form-embedded.js:42$get.c.$digest @ angular.js:12251$get.c.$apply @ angular.js:12516n.factory.e.forEach.s.(anonymous function).i.done @ index.js:72(anonymous function) @ camunda-bpm-sdk-angular.js:48035.p.callback @ camunda-bpm-sdk-angular.js:6542(anonymous function) @ camunda-bpm-sdk-angular.js:619436.n.emit @ camunda-bpm-sdk-angular.js:694535.p.end.r.onreadystatechange @ camunda-bpm-sdk-angular.js:6614

camunda-bpm-sdk-angular.js:458 Uncaught TypeError: Cannot read property 'body' of undefined(anonymous function) @ camunda-bpm-sdk-angular.js:45835.p.callback @ camunda-bpm-sdk-angular.js:654235.p.crossDomainError @ camunda-bpm-sdk-angular.js:655635.p.end.r.onreadystatechange @ camunda-bpm-sdk-angular.js:661235.p.end @ camunda-bpm-sdk-angular.js:66615.l.load @ camunda-bpm-sdk-angular.js:542n.factory.e.forEach.s.(anonymous function) @ index.js:7922.CamundaForm.initialize @ camunda-bpm-sdk-angular.js:3287CamundaForm @ camunda-bpm-sdk-angular.js:325920.i.extend.n @ camunda-bpm-sdk-angular.js:2968l @ cam-tasklist-form-embedded.js:73(anonymous function) @ cam-tasklist-form-embedded.js:42$get.c.$digest @ angular.js:12251$get.c.$apply @ angular.js:12516n.factory.e.forEach.s.(anonymous function).i.done @ index.js:72(anonymous function) @ camunda-bpm-sdk-angular.js:48035.p.callback @ camunda-bpm-sdk-angular.js:6542(anonymous function) @ camunda-bpm-sdk-angular.js:619436.n.emit @ camunda-bpm-sdk-angular.js:694535.p.end.r.onreadystatechange @ camunda-bpm-sdk-angular.js:6614

angular.js:9778 Error: Failed to execute 'send' on 'XMLHttpRequest': Failed to load 'app:forms/request-loan.html?noCache=1430176670773'.

    at Error (native)

    at p.35.p.end (http://hmm-loaner-334:8080/camunda/app/tasklist/scripts/camunda-tasklist-ui.js:2:26303)

    at 5.l.load (http://hmm-loaner-334:8080/camunda/app/tasklist/scripts/camunda-tasklist-ui.js:1:5467)

    at s.n.factory.e.forEach.s.(anonymous function) [as load] (http://hmm-loaner-334:8080/camunda/app/tasklist/scripts/camunda-tasklist-ui.js:3:6840)

    at 22.CamundaForm.initialize (http://hmm-loaner-334:8080/camunda/app/tasklist/scripts/camunda-tasklist-ui.js:1:23103)

    at CamundaForm (http://hmm-loaner-334:8080/camunda/app/tasklist/scripts/camunda-tasklist-ui.js:1:22193)

    at new 20.i.extend.n (http://hmm-loaner-334:8080/camunda/app/tasklist/scripts/camunda-tasklist-ui.js:1:20219)

    at l (http://hmm-loaner-334:8080/camunda/app/tasklist/scripts/camunda-tasklist-ui.js:6:1812)

    at Object.fn (http://hmm-loaner-334:8080/camunda/app/tasklist/scripts/camunda-tasklist-ui.js:6:1932)

    at c.$get.c.$digest (http://hmm-loaner-334:8080/camunda/app/tasklist/scripts/deps.js:5:27128)

[Firefox console]

GET 

http://localhost:8080/camunda/api/engine/engine/default/process-definition/approve-loan:5:904/startForm [HTTP/1.1 200 OK 62ms]

"Error: Access to restricted URI denied

[28]</f.prototype.end@http://localhost:8080/camunda/app/tasklist/scripts/deps.js:10:564

[5]</s.prototype.load@http://localhost:8080/camunda/app/tasklist/scripts/deps.js:9:1188

r.prototype[n]@http://localhost:8080/camunda/app/tasklist/scripts/camunda-tasklist-ui.js:1:16959

[19]</CamundaForm.prototype.initialize@http://localhost:8080/camunda/app/tasklist/scripts/deps.js:9:13761

CamundaForm@http://localhost:8080/camunda/app/tasklist/scripts/deps.js:9:12863

[17]</r.extend/n<@http://localhost:8080/camunda/app/tasklist/scripts/deps.js:9:10918

l@http://localhost:8080/camunda/app/tasklist/scripts/camunda-tasklist-ui.js:5:12579

.link/<@http://localhost:8080/camunda/app/tasklist/scripts/camunda-tasklist-ui.js:5:12699

Dn/this.$get</l.prototype.$digest@http://localhost:8080/camunda/app/tasklist/scripts/deps.js:5:30646

Dn/this.$get</l.prototype.$apply@http://localhost:8080/camunda/app/tasklist/scripts/deps.js:6:145

r.prototype[n]/a.done@http://localhost:8080/camunda/app/tasklist/scripts/camunda-tasklist-ui.js:1:16942

n/<@http://localhost:8080/camunda/app/tasklist/scripts/deps.js:9:473

[28]</f.prototype.callback@http://localhost:8080/camunda/app/tasklist/scripts/deps.js:9:31401

f/<@http://localhost:8080/camunda/app/tasklist/scripts/deps.js:9:28263

[29]</n.prototype.emit@http://localhost:8080/camunda/app/tasklist/scripts/deps.js:10:2263

[28]</f.prototype.end/a.onreadystatechange@http://localhost:8080/camunda/app/tasklist/scripts/deps.js:9:32061

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Does anyone knows to custom build method..??? using..
camunda-bpm-webapp for stand-alone camunda webapp and the remote application for embedded camunda application ??

or am I wrong ?? there is only one way to use the distribution version for camunda webapp ??

Thanks Sebastian,



 


Andrew Kim

unread,
Apr 29, 2015, 5:34:59 PM4/29/15
to camunda-...@googlegroups.com
If someone knows about this problem.., could you check my source file ??
I didn't change a lot from original source code. I've changed just db connection and the embedded task form.

,and I deployed the glassfish stand alone camunda-bpm-webapp(https://github.com/camunda/camunda-bpm-webapp)

=> deployed war (<workspace>\camunda-bpm-webapp\distro\glassfish-standalone\target\camunda-webapp-glassfish-standalone-7.3.0-SNAPSHOT.war)


The sample source file is only for Tomcat ?? or do I have to change rest-easy configuration ? or some else ??

embedded-spring-rest.zip

Valentin Vago

unread,
Apr 30, 2015, 2:11:47 AM4/30/15
to camunda-...@googlegroups.com
Hi,

CORS (for Cross Origin Requests) have to be configured on the server(let) (I can't help here as my knowledge about Java is rather geographic).
Basically, this is one of the reasons why the rest engine and the webapps are served by the same "server" (so to say).

You'll find some explanations about the CORS security feature and how to deal with it here:

Cheers,
Valentin

Andrew Kim

unread,
Apr 30, 2015, 10:36:25 PM4/30/15
to camunda-...@googlegroups.com
Hi, 

I tried many type of the CORS security features, but still it's not working then what else the problem is.. as your mentioned ?? 

I'm really confusing that the jetty and distribution are working well, but..the others do not working which is with the standalone camunda webapp.


Thank you Valentin,

thomas.s...@gmail.com

unread,
Aug 25, 2015, 5:14:12 AM8/25/15
to camunda BPM users
I was having this problem when really there was a missing dependency (which strangely only was visible on undeploy - class not found exception).

han...@zymergen.com

unread,
Dec 8, 2015, 12:25:27 AM12/8/15
to camunda BPM users, thomas.s...@gmail.com
On Tuesday, August 25, 2015 at 2:14:12 AM UTC-7, thomas.s...@gmail.com wrote:
> I was having this problem when really there was a missing dependency (which strangely only was visible on undeploy - class not found exception).

What was the missing dependency? I'm having this problem too and pulling my hair out. I don't think it's a CORs issue. (Plus I'm requesting from localhost so why would it be CORs?)

han...@zymergen.com

unread,
Dec 8, 2015, 12:33:07 AM12/8/15
to camunda BPM users
Did you figure out the problem?
Reply all
Reply to author
Forward
0 new messages