Deployment from modeler to Spring Boot embedded Camunda engine

Hi there,

I have an issue with the deployment from Modeler to a Spring Boot embedded Camunda process engine with enabled ReST API (v7.14). And it’s really strange - at least for me :smiley:

When I set an explicit engine name in my application.properties (e.g. camunda.bpm.process-engine-name=aname), the deployment cease to work, because no running engine is found. With Wireshark I found out, that the /deployment endpoint is queried and indeed it returns that error:

curl "http://localhost:8080/engine-rest/deployment"
{"type":"InvalidRequestException","message":"No process engine available"}

When I remove the explicit name in the application.properties, everything is ok again:

url "http://localhost:8080/engine-rest/deployment"
[]

Is this the intended behaviour?

Thanks!

BR,
Sebastian

Have you added the rest api to the spring boot application?
Can you upload your pom file?

Sure. The ReST API generally works, so idk if that really helps.

plugins {
    id 'java'
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-web:2.4.4'
    implementation 'org.springframework.boot:spring-boot-starter-data-jdbc:2.4.4'
    implementation 'org.springframework.boot:spring-boot-configuration-processor:2.4.4'
    implementation 'org.springframework.boot:spring-boot-starter-actuator:2.4.4'
    implementation 'org.springframework.boot:spring-boot-starter-security:2.4.4'
    implementation 'org.springframework.boot:spring-boot-starter-oauth2-client:2.4.4'
    implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server:2.4.4'
    implementation 'org.postgresql:postgresql:42.2.19'
    implementation 'org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter:7.14.0'
    implementation 'org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-rest:7.14.0'
    implementation 'org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp:7.14.0'
    implementation 'org.camunda.bpm.extension:camunda-bpm-identity-keycloak:2.0.0'

    testImplementation 'org.springframework.boot:spring-boot-starter-test:2.4.4'
}

the endpoint should be like below:

http://localhost:8080/engine-rest/deployment/create

You need to suffix the /create path in the url.

https://docs.camunda.org/manual/latest/reference/rest/deployment/post-deployment/#method

1 Like

That might be for the deployment per se, but this is the URL that Modeler calls, when I point the deployment dialog to http://localhost:8080/engine-rest. In case an explicit name is set I get this red triangle thing that there’s no running engine. If I remove the name and just use the default, Modeler is fine.

Honestly, I think it is a bug.

@spa Without /create suffix in the deployment url, the modeller throws below error:

Not sure how does that works for you without /create suffix in the deployment url.

Sorry, I think we have a misunderstanding here. So for me it works generally when I only point it to /engine-rest (of course only when i leave the engine name alone as written).

In the screenshot you see the situation when I run my app without an engine name set. When I set an engine name, I have that red triangle next to the REST endpoint input (sorry, I’m only allowed to attach one media).

What the Modeler does internally to check if an engine is running (checked with Wireshark):
It does a GET on /engine-rest/deployment (so not the POST yet to deploy anything). When no name is set the response is [] with HTTP status 200, with a name it is {"type":"InvalidRequestException","message":"No process engine available"} with HTTP status 400. I guess this error makes the little red triangle appear.

I do not understand, why giving a name to the engine causes this invalid request exception.

Hi @spa,

you can add the engine name to the URL: Overview | docs.camunda.org

For examle:

grafik

Hope this helps, Ingo