I understand that .form files must be added to deploy from the modeler. What other files must be added and what files must be in the processes.xml file e.g. dmn java yaml
I am running Camunda 7 from Java
I understand that .form files must be added to deploy from the modeler. What other files must be added and what files must be in the processes.xml file e.g. dmn java yaml
I am running Camunda 7 from Java
With Camunda 7 is depends on exactly how you’re deploying your processes.
I created the process and forms in the Modeler, run the IntelliJ IDE which has Java delegates, processes.xml. application.yaml and Spring boot annotations. The process runs fine from the IDE but when I try to launch the resulting jar in the target folder (java -jar test.jar) if has the annoying form failure message on reaching the use task with the Camunda form.
Obviously I am deploying incorrectly.
Hi @Gary_Blake
This sound like a build problem. How did you create the project you are running in IntelliJ? Is it a Maven or Gradle project?
You can use the Camunda Platform Initlizr to create a basic project:
Have you checked inside the jar file if the .form files are present?
BR
Michael
Its a Maven project
I used the Initizr to create the project
the jar has the form
error message:
Caused by: org.camunda.bpm.engine.ProcessEngineException: The deployment contains definitions with the same key ‘Basic2’ (id attribute), this is not allowed
Hi @Gary_Blake
Does your application contain multiple process definitions (*.bpmn) or forms (.form) that have the same id (“Basic2”) set (inside Modeler)?
BR
Michael
1 form
1 bpmn
Hi @Gary_Blake
I can reproduce this error:
Caused by: org.camunda.bpm.engine.ProcessEngineException: The deployment contains definitions with the same key 'Basic2' (id attribute), this is not allowed
at org.camunda.bpm.engine.impl.AbstractDefinitionDeployer.ensureNoDuplicateDefinitionKeys(AbstractDefinitionDeployer.java:192) ~[camunda-engine-7.21.0.jar:7.21.0]
But, only if my process application has 2 bpmn files that have the same key:
Are you sure there is only 1 bpmn file?
BR
Michael
Firstly… thanks for the help.
Only 1 bpmn file.
I am creating the jat from IntelliJ maven install
maven deploy yields - Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy (default-deploy) on project demo: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::url parameter
could another deployment be lurking in my local repository?
Hi @Gary_Blake
Try running the following Maven build (clean, spring-boot:repackage) from IntelliJ:
If the build completes, you should have the JAR file (.jar) in the “target” folder of your project. From that folder you can start a command line / shell and then run the following command (be sure you have the correct Java version installed and available from the command line / shell):
java -jar <name-of-your-jar-file>
BR
Michael
still getting the not allowed message
Do you have a clean log (no deployment errors) in the console from where you started the application using java -jar …?
Can you post your form file?
BR
Michael
Hi @Gary_Blake
I have just tested a form with a Camunda Spring Boot starter app, and the default behaviour it is to not include form files in the Spring auto deployer.
Have at look at this:
Can you try to change your application.yaml to include the following key camunda.bpm.deployment-resource-pattern like this (be careful not to mess up existing config):
camunda:
bpm:
deployment-resource-pattern: classpath*:**/*.bpmn, classpath*:**/*.bpmn20.xml, classpath*:**/*.dmn, classpath*:**/*.dmn11.xml, classpath*:**/*.cmmn, classpath*:**/*.cmmn10.xml, classpath*:**/*.cmmn11.xml, classpath*:**/*.form
This will instruct the auto deployer til also include form files.
BR
Michael
no log file found
form file:
{
“components”: [
{
“label”: “Name”,
“type”: “textfield”,
“layout”: {
“row”: “Row_070j594”,
“columns”: null
},
“id”: “Field_0u859yv”,
“key”: “name”
},
{
“label”: “Approve”,
“type”: “checkbox”,
“layout”: {
“row”: “Row_1rchp3j”,
“columns”: null
},
“id”: “Field_0jhts53”,
“key”: “approve”,
“defaultValue”: true
}
],
“type”: “default”,
“id”: “input”,
“exporter”: {
“name”: “Camunda Modeler”,
“version”: “5.24.0”
},
“executionPlatform”: “Camunda Platform”,
“executionPlatformVersion”: “7.21.0”,
“schemaVersion”: 16
}
same error after changing the yaml
I’m going to start a fresh test application, follow your steps and see how that goes. It may be that I have introduced “errors” with all my changes.
I will let you know how that goes
Thanks
SUCCESS !
2 items fixed the problem
camunda:
bpm:
deployment-resource-pattern: classpath*:/.bpmn, classpath:/.bpmn20.xml, classpath:/.dmn, classpath:/.dmn11.xml, classpath:/.cmmn, classpath:/.cmmn10.xml, classpath:/.cmmn11.xml, classpath:/*.form
I have never found in the documentation to use spring-boot repackage. It might be an idea to set up a simple tutorial using my code as an example as it illustrates the most basic use of forms and delgates.
I’m going to add in some DMN so that all elements are tested.
Thanks for you help… I have spent days on this.
Hi @Gary_Blake
Great!
There is a different way to get a correct build of the JAR file. It is also possible to change the POM file to hook into the package life cycle and that way you don’t have to use the repackage task. I would advise you to use that approach instead. You can read about it here:
BR
Michael
Can’t thank you enough for all the help
Take care
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.