Error using embedded forms with Camunda Spring Boot - spring-boot

I have my process(bpm file) defined as part of the Camunda Spring Boot project. I have a form attached to a Start Event. When I start my process I get "Form failure: Origin is not allowed by Access-Control-Allow-Origin" error.
I have checked Chrome console and found "XMLHttpRequest cannot load app:forms/my-form.html?noCache=1455724524763. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource" error message.
I had packaged the same process outside a Spring Boot project as a normal web app and deployed the war to Camunda Tomcat. It ran without any issue.
The issue happens when I package the same process as part of Camunda Spring Boot project.
Found 2 links describing similar issue but not helping much in terms of resolution.
https://github.com/plexiti/camunda-grails-plugin/issues/47
https://app.camunda.com/jira/browse/CAM-2146
Does Camunda Spring Boot project support embedded form. I have not seen any example of embedded form for Camunda Spring Boot.
I am pretty much stuck. So any help will be much appreciated.

This happens if the Tasklist can not determine the context path of the application. I just experienced that today in a customer training, when I undeployed a war file from a Wildfly.
A workaround could be to use an absolute path in the formKey, e.g. embedded:/mywebapp/forms/my-form.html

We had this problem as well. My coworker left this comment on the github issues of the project that you might find useful: https://github.com/camunda/camunda-bpm-spring-boot-starter/issues/39

Related

Azure Active Directory in Spring App Without Boot

I have been trying to set up a Spring Web application to use Azure Active Directory.
All the samples that I have found online are based on Spring Boot, is there a simple example that shows setting up spring framework web app only without using Spring Boot?
I am having no luck finding stuff, I am also trying to figure out how to convert all the spring boot autoconfig. Surely there is a sample somewhere that makes it easy to use for a Spring Framework only web-app?
I was able to figure this out somewhat. I'm very new to OAuth so still trying to learn as I go.
Basically I followed the Spring Reference and got things working using the override auto-configuration sections at https://docs.spring.io/spring-security/reference/servlet/oauth2/index.html
It also helped that I updated the Spring Framework versions to the latest and made sure I used the correct dependencies according to that reference site

Camunda WebApp couldnt be started in SpringBoot

maybe somebody can help me with my problem. Currently trying to get Camunda running within my Spring Boot App. The Core Camunda Parts i could get running, but now i would like to add also the WebApps of Camunda (Cockpit / Tasklist etc.)
i added the dependency:
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
<version>7.13.0</version>
<scope>provided</scope>
I tried to access it via the localhost:8080/camunda/app/welcome/ but besides of the Loading indicator i cant see anything. In my Spring Boot Application instead I see that a lot of Java Script couldn't be found from Frontend Request. e.g getting the error 404 /localhost/camunda/require.js not found.
Has anybody any idea what i am doing wrong. I tried it once with an empty Spring Boot Project and there it was working fine, but adding it to an existing project causes this issue.
More information on your project (depenedency:tree) would be required to tell why. Most likely you have included incompatible versions. Clearing the browser cache or trying in a private window may also help.
You can always create a clean Spring Boot setup with compatible library / Spring Boot versions including engine, REST API, Web Apps (and possibly security, Camunda BPM assert) using https://start.camunda.com/.

Spring boot + Activiti explorer

Is it possible to integrate activiti explorer maven plugin with activiti Spring boot app?, so that we can make use of activit-explorer to view deployed process in activit-spring boot engine.
I know we can use rest-api over spring boot to query process engine, but I want to know if it is possible to run the explorer over spring boot by adding it as a maven plugin during deployment?Or can we tweak the activit-explorer.war somehow to point to spring-boot activiti engine?
activiti-explorer.war is standalone webapp by itself. I've write some guideline on how to manually to embed activiti-explorer to you own app. http://blog.canang.com.my/2016/05/12/embedding-activiti-explorer-to-your-application/
Most probably step 5 in my blog is your solution.
btw, there's reason why the name is 'default'. I can't recall it atm
I thought of answering my own question so that it will be useful for other developers with similar requirement. If you want to make an eco-system where activiti-rest, explorer and your custom end points co-exist, please refer this thread from activit forum. I have tried this and is working fine. link to thread
I would like to give my observation here. In order to avoid getting into pulling source and trying to build myself, I achieved partial success, by installing the activit-explorer as part of the usual standalone installation.Started the standalone activiti-explorer using Apache-Tomcat but I configured the database for Activiti as same as (MYSQL in my case) I used in my spring-boot application to hit the common ground.
But apparently the activiti version in my spring boot app was 5.19.0.0 and that for activiti-explorer was 5.22.0.0, which created some misalignment for spring boot application startup to fail. I am hopeful that with matching versions it might succeed. When I get some more time on me I will try and update. Since then may be someone can use this route.

how to deploy Spring boot actuate application in external tomcat server

Im trying to just use the basic endpoints that comes with spring actuate and want to deploy in the external tomcat server without using spring boot. How to achieve this, could anyone help me please. Is there any configuration changes that I need to do. This website gives an idea but it uses older version of spring-boot-actuate. Also EndpointHandlerMapping and EndpointHandlerAdapter doesnt come with newer version of spring boot actuate.
Anyways I get 404 resource not found when deploying to the server.
Check out this question to see if it helps you. The Actuator component is a Spring Boot feature but you can use individual components within an existing application with the right build and configuration setups.

Deploy spring app in Websphere get Error 404: SRVE0190E

I'm trying to deploy a spring + angularJS app (packaging as war) into websphere (7.0.0.25), but even for the sample app I cloned from spring, I always get Error 404: SRVE0190E: File not found. And even for the spring app, I have to explicitly specify index.html in the URL, otherwise I get the same error. But the angular side is tolerable, can anyone help me with the spring side?
The sample application is: https://github.com/spring-guides/gs-convert-jar-to-war-maven.git
After doing "mvn clean package" in "/gs-convert-jar-to-war-maven/complete" to get the war, I follow the steps here to upload and deploy the war in websphere:
http://www.packtpub.com/article/deploying-applications-on-websphere-application-server-7.0-part1
I also tried this post to set the custom properties but still didn't work: http://frightanic.com/software-development/solution-to-error-404-srve0190e-on-websphere-6-1/
Also, both my app and the sample spring app don't have a web.xml as spring will take care of it. Both apps work fine in jetty and Tomcat. Only websphere has the problem. Besides, I don't know how to manually configure a web.xml if that will be the solution (need to be pointed to more resources).
The URLs I tried but failed to access the app are:
localhost:9080
localhost:9080/gs-convert-jar-to-war-0_1_0_war
localhost:9080/someAppName
Thanks in advance!
It turns out that websphere 7 doesn't support some spring annotations/classes. My solution is to write a web.xml file and turn off spring auto-configuration.

Resources