camunda-formio-plugin icon indicating copy to clipboard operation
camunda-formio-plugin copied to clipboard

Getting started help?

Open CharlesIrvineKC opened this issue 3 years ago • 13 comments

This plugin looks really great. Unfortunately, I think I need some help getting started.

The springboot example is not very accessible to me since I know neither gradle or kotlin (been meaning to try out kotlin though).

The docker example isn't very accessible since I'm weak on docker.

It would be nice if there were a maven/java springboot example and/or a non-docker/java/maven Camunda Tomcat example.

Finally, I don't know form.io so a little help aimed at a form.io newbie would be quite helpful.

In the meantime, I'll try to forge ahead.

CharlesIrvineKC avatar Jan 28 '22 16:01 CharlesIrvineKC

Watch a few videos on docker-compose. It is your easiest setup and can be learned very quickly. Disable the form validation service/server in the docker compose for a even faster setup.

StephenOTT avatar Jan 28 '22 17:01 StephenOTT

I have done a little docker, but it has been a while. I had a commercial web app that I deployed to an EC2 instance with docker and docker swarm. So, I am somewhat familiar with docker compose. However, I can't make much of your instructions in your docker example. If you have the time and are so inclined:

Download the resources from the release: forms.zip, tasklist.zip, formfieldvalidation-*-server-plugin.jar What is "the release"?

Unzip the .zip files and Place the resources into the docker folder What "docker folder"?

build the image (expose 8080) How do I build the image and expose 8080

run shadowJar task in formfieldvalidator project run copyShadowJarToDockerFiles task in formfieldvalidator project Where do I find the formfieldvalidator project?

run setupDockerFiles task in root project Where do I find the "root project"?

CharlesIrvineKC avatar Jan 28 '22 20:01 CharlesIrvineKC

Hi @StephenOTT. I'm making a little progress, but I still need a some help. Commenting on my last post:

Regarding "the release", I wasn't familiar with GitHub releases, so I didn't know where to get forms.zip, tasklist.zip and formfieldvalication-*-server-plugin.jar. I'm able to download these now.

Regarding the "docker-folder", that is just the docker folder in your project file structure.

After doing the above, I built and ran the image, exposing port 8080. After that, I was able to bring up the Camunda.

Here is where I'm stuck. The second section in the docker directory readme file, entitled "Build Instructions", instructs me to run three tasks and then do a docker build and run. I assume that the tasks are gradle tasks. I'm don't really know gradle, but I assume that I can figure out how to run these tasks.

My problem is that I don't understand the purpose of those tasks. What do these tasks accomplish?

Sorry that I'm so confused. There is just a lot to this that I'm unfamiliar with. Any help appreciated.

CharlesIrvineKC avatar Feb 01 '22 13:02 CharlesIrvineKC

Hey @ChuckIrvine maybe you would like to check out a very simple Camunda set up with SpringBoot, Maven and Java: how to repo

francav avatar Feb 02 '22 09:02 francav

Hi @francav,

Thanks for the reference, I am very familiar with the material in your "how to". I've been working with Camunda for a few years now. I'm just having trouble getting the plugin that @StephenOTT wrote installed and working. It's somewhat slow going since I'm unfamiliar some of the stuff that he's using in his instructions. I'm making some progress though.

Thanks

CharlesIrvineKC avatar Feb 02 '22 12:02 CharlesIrvineKC

Hey @ChuckIrvine,

I was playing with this project some months ago and wondered if we could have a java/maven version. Take a look at this branch It's not fully functional but you can test drive deploying the BPMN and form.json files from the process folder.

Regards,

Victor Franca

francav avatar Feb 02 '22 13:02 francav

@francav I appreciate your help! I see that the branch is a spring boot / maven / camunda project. I started it in eclipse by executing "run java application" on the ProcessApp class. After doing so, I pulled up Camunda at localhost:8080/camunda and tried to log in with demo/demo and I got the error below. What do I need to do to get past that?

Screen Shot 2022-02-02 at 8 22 07 AM

CharlesIrvineKC avatar Feb 02 '22 14:02 CharlesIrvineKC

Hey @ChuckIrvine pull last commits and try again, please.

francav avatar Feb 02 '22 14:02 francav

@francav After pulling, I got past the login error. Actually, I worked around the problem before by altering one of your config classes. With my change, after logging in, I was able to start your diagram_1.bpmn process, but now with your update, the model doesn't get deployed. Haven't tracked it down yet.

CharlesIrvineKC avatar Feb 02 '22 15:02 CharlesIrvineKC

@ChuckIrvine, I pushed a few changes but don't know If they fixed the process deployment issue you mentioned. Let me know if you still see it after pulling the latest commits.

francav avatar Feb 03 '22 09:02 francav

@francav I did a pull, but didn't get any changes.

CharlesIrvineKC avatar Feb 03 '22 13:02 CharlesIrvineKC

@ChuckIrvine my mistake. Done now.

francav avatar Feb 03 '22 18:02 francav

Hello, I would like to use your plug-in, it looks awesome!

I tried to integrate your plug-in in my Spring Boot Camunda, and I face the same issue as @ChuckIrvine : what are we supposed to do? Copy the src?

1/ So, I tried to execute the _formio plug-in project. Thank Intellij, it seems happy with the Gradle file and did a lot of work. Then, I started

kotlin/com/github/stephenott/camunda/formio/Application.kt

It's working, and when I tried to connect with demo/demo, I got the same error that @ChuckIrvine :

"CSRFPreventionFilter: Invalid HTTP Header Token."

Does it seem you didn't report the CSRF issue on the master? I tried admin/admin too (the user registered in the application.properties), same.

2/ I switched to your branch "maven-java" Intellij reports this error 4:01 PM Gradle sync failed: Executing Gradle tasks as part of a build without a settings file is not supported. Make sure that you are executing Gradle from a directory within your Gradle project. Your project should have a 'settings.gradle(.kts)' file in the root directory. (45 s 396 ms)

Why Gradle want to build this project where it is supposed to be on maven?

But the point is this is not possible to start the project: Gradle still do something, because the compilation failed: It can find

import org.springframework.boot.SpringApplication;

but I don't have any issue with maven install. Execution is

Task 'ProcessApp.main()' not found in root project 'camunda-formio-plugin'.

* Try:
Run Gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

3/ Looking at this project, I assume I need to copy com.victrofranca.camundaformio folder in my project, and it should work. The compilation is OK. I used the

  • Camunda 7.16 version,
  • Spring Boot 2.5.6
  • Spin 1.10.0
  • camunda-spin-dataformat-json-jackson1.14.0

but when I access my form, I still have this error: http://localhost:8080/forms/formio.html?deployment=FormExpenseNote.json&var=submission&transient=true&noCache=1646959160563&userId=demo&engineName=default

So, how is this URL supposed to work? It seems the plugin capture localhost:8080/validate, and not localhost:8080/forms

Thank you,

pierre-yves-monnet avatar Mar 11 '22 00:03 pierre-yves-monnet