# Deploying from Modeller

**URL:** <https://forum.camunda.io/t/deploying-from-modeller/53001>\
**Category:** Camunda 7 Topics\
**Created:** [June 7, 2024, 1:07pm UTC](https://forum.camunda.io/t/deploying-from-modeller/53001 "2024-06-07T13:07:34Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gary\_Blake](https://forum.camunda.io/user_avatar/forum.camunda.io/gary_blake/32/3247_2.png) [@Gary\_Blake](https://forum.camunda.io/u/Gary_Blake)\
**Post date:** [June 7, 2024, 1:07pm UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/1 "2024-06-07T13:07:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Niall](https://forum.camunda.io/user_avatar/forum.camunda.io/niall/32/15333_2.png) [@Niall](https://forum.camunda.io/u/Niall)\
**Post date:** [June 7, 2024, 1:43pm UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/2 "2024-06-07T13:43:45Z")

</div>

With Camunda 7 is depends on exactly how you’re deploying your processes.

---

<div class="post-metadata">

**Author:** ![Gary\_Blake](https://forum.camunda.io/user_avatar/forum.camunda.io/gary_blake/32/3247_2.png) [@Gary\_Blake](https://forum.camunda.io/u/Gary_Blake)\
**Post date:** [July 8, 2024, 7:26pm UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/3 "2024-07-08T19:26:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mimaom](https://forum.camunda.io/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@mimaom](https://forum.camunda.io/u/mimaom)\
**Post date:** [July 9, 2024, 5:43am UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/4 "2024-07-09T05:43:17Z")

</div>

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:

> **[Camunda Automation Platform 7 Initializr](https://start.camunda.com/)**
>
> Camunda Automation Platform 7 + Spring Boot in Seconds

Have you checked inside the jar file if the .form files are present?

BR  
Michael

---

<div class="post-metadata">

**Author:** ![Gary\_Blake](https://forum.camunda.io/user_avatar/forum.camunda.io/gary_blake/32/3247_2.png) [@Gary\_Blake](https://forum.camunda.io/u/Gary_Blake)\
**Post date:** [July 10, 2024, 2:35pm UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/5 "2024-07-10T14:35:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mimaom](https://forum.camunda.io/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@mimaom](https://forum.camunda.io/u/mimaom)\
**Post date:** [July 10, 2024, 3:13pm UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/6 "2024-07-10T15:13:48Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Gary\_Blake](https://forum.camunda.io/user_avatar/forum.camunda.io/gary_blake/32/3247_2.png) [@Gary\_Blake](https://forum.camunda.io/u/Gary_Blake)\
**Post date:** [July 10, 2024, 3:44pm UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/7 "2024-07-10T15:44:22Z")

</div>

1 form  
1 bpmn

---

<div class="post-metadata">

**Author:** ![mimaom](https://forum.camunda.io/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@mimaom](https://forum.camunda.io/u/mimaom)\
**Post date:** [July 10, 2024, 5:21pm UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/8 "2024-07-10T17:21:08Z")

</div>

Hi @Gary_Blake

I can reproduce this error:

```auto
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:

![image](https://forum.camunda.io/uploads/default/original/3X/c/7/c7d3f1eca74a8e56fbd6c34e97f53d2d295c94ca.png)

Are you sure there is only 1 bpmn file?

BR  
Michael

---

<div class="post-metadata">

**Author:** ![Gary\_Blake](https://forum.camunda.io/user_avatar/forum.camunda.io/gary_blake/32/3247_2.png) [@Gary\_Blake](https://forum.camunda.io/u/Gary_Blake)\
**Post date:** [July 10, 2024, 6:03pm UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/9 "2024-07-10T18:03:02Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mimaom](https://forum.camunda.io/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@mimaom](https://forum.camunda.io/u/mimaom)\
**Post date:** [July 10, 2024, 6:55pm UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/10 "2024-07-10T18:55:01Z")

</div>

Hi @Gary_Blake

Try running the following Maven build (clean, spring-boot:repackage) from IntelliJ:

 ![image](https://forum.camunda.io/uploads/default/original/3X/f/e/fe62171ffb82ba0ad9174ab15d7707f5115879f2.png)

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):

```auto
java -jar <name-of-your-jar-file>

```

BR  
Michael

---

<div class="post-metadata">

**Author:** ![Gary\_Blake](https://forum.camunda.io/user_avatar/forum.camunda.io/gary_blake/32/3247_2.png) [@Gary\_Blake](https://forum.camunda.io/u/Gary_Blake)\
**Post date:** [July 10, 2024, 8:34pm UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/11 "2024-07-10T20:34:01Z")

</div>

still getting the not allowed message

---

<div class="post-metadata">

**Author:** ![mimaom](https://forum.camunda.io/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@mimaom](https://forum.camunda.io/u/mimaom)\
**Post date:** [July 11, 2024, 4:32am UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/12 "2024-07-11T04:32:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mimaom](https://forum.camunda.io/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@mimaom](https://forum.camunda.io/u/mimaom)\
**Post date:** [July 11, 2024, 9:44am UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/13 "2024-07-11T09:44:44Z")

</div>

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:

> [@Problem with forms in Java Spring Boot](https://forum.camunda.io/t/problem-with-forms-in-java-spring-boot/39205):
>
> Hi, I want to add a form to a human task in Java Spring Boot distro. According to [this tutorial](https://www.youtube.com/watch?v=QXt5FzW4eMA&list=PLJG25HlmvsOVssaiPmavxv3htN_dXS3BW&index=2), I put my form inside resources/static/forms directory, and set the forms attributes of my human task as below: [image] (the form file name, and also its id are pin-code) But, this doesn’t work. I had done this in another project and it had worked. I am confused what the problem is now. In other distros (Camunda Run/TomCat), I did this simply by setting Camunda-Forms as Forms Type, and \<my-form-…

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):

```auto
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

---

<div class="post-metadata">

**Author:** ![Gary\_Blake](https://forum.camunda.io/user_avatar/forum.camunda.io/gary_blake/32/3247_2.png) [@Gary\_Blake](https://forum.camunda.io/u/Gary_Blake)\
**Post date:** [July 11, 2024, 10:47am UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/14 "2024-07-11T10:47:50Z")

</div>

1. no log file found

2. 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  
}

3. 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

---

<div class="post-metadata">

**Author:** ![Gary\_Blake](https://forum.camunda.io/user_avatar/forum.camunda.io/gary_blake/32/3247_2.png) [@Gary\_Blake](https://forum.camunda.io/u/Gary_Blake)\
**Post date:** [July 11, 2024, 11:24am UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/15 "2024-07-11T11:24:25Z")

</div>

SUCCESS !  
2 items fixed the problem

1. yaml

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

1. mvn clean package spring-boot:repackage  
you have to package before repackage

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.

---

<div class="post-metadata">

**Author:** ![mimaom](https://forum.camunda.io/letter_avatar_proxy/v4/letter/m/58956e/32.png) [@mimaom](https://forum.camunda.io/u/mimaom)\
**Post date:** [July 11, 2024, 1:17pm UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/16 "2024-07-11T13:17:08Z")

</div>

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:

> **[Setup a Spring Boot Project | docs.camunda.org](https://docs.camunda.org/get-started/spring-boot/project-setup/)**
>
> documentation of the Camunda Platform 7

BR  
Michael

---

<div class="post-metadata">

**Author:** ![Gary\_Blake](https://forum.camunda.io/user_avatar/forum.camunda.io/gary_blake/32/3247_2.png) [@Gary\_Blake](https://forum.camunda.io/u/Gary_Blake)\
**Post date:** [July 11, 2024, 4:41pm UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/17 "2024-07-11T16:41:25Z")

</div>

Can’t thank you enough for all the help  
Take care

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [July 18, 2024, 4:42pm UTC](https://forum.camunda.io/t/deploying-from-modeller/53001/18 "2024-07-18T16:42:00Z")

</div>

Closed on July 18, 2024, 4:42pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
