Hi, I tried to start simple process via rest client but I always received an error 400. I have stand-alone Camunda Community 7.13. My process is the same like this in Niall’s tutorial from YT with WatchMunster example.
I can’t find any good solution for it. The message is empty so I do not know what may it wrong. Can anyone help me solved this issue? When I tried simple .getForEntity( url, JsonNode.class) I received Status.Ok…
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:798) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:779) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:322) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at de.ikor.ClaimBPMS.ClaimBpmsApplication.main(ClaimBpmsApplication.java:15) [classes/:na]
Caused by: org.springframework.web.client.HttpClientErrorException$BadRequest: 400 : [{"type":"InvalidRequestException","message":""}] ```
Are you using a tomcat distro?
Also - are you able to reach the rest api through the browser?
If you make this call http://localhost:8080/engine-rest/engine you should get [{"name":"default"}] back.
Both (name and id) are WatchMunster. I also tried with /process-definition/WatchMunster/start and received the same error.
Edit. Sorry I’m wrong id is different but I tried it also and always the same result. I’m not sure, maybe I should set something in headers? But I tried few options and no changes
I’m sorry, I misunderstood you, I’m running my project as a java application. (I have camunda tomcat distro). And when I run my application I get the error 400.
I have been downloaded camunda community. And I simply start it via bat file- I have an access in i.e. browser in url: http://localhost:8080/camunda, and then I start my project in Intelij as java application. If I good understand, in start it’s call the camunda for start the process. And I always have an exception: (IllegalStateException: Failed to execute CommandLineRunner)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:798) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:779) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:322) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
at pl.wgie.ClaimBPMS.ClaimBpmsApplication.main(ClaimBpmsApplication.java:13) [classes/:na]
Caused by: org.springframework.web.client.HttpClientErrorException$BadRequest: 400 : [{"type":"InvalidRequestException","message":""}]
at org.springframework.web.client.HttpClientErrorException.create(HttpClientErrorException.java:101) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:170) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:112) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:782) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:740) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:583) ~[spring-web-5.2.6.RELEASE.jar:5.2.6.RELEASE]
at pl.wgie.ClaimBPMS.rest.CamundaRestController.callRestService(CamundaRestController.java:27) ~[classes/:na]
at pl.wgie.ClaimBPMS.rest.CamundaRestController.run(CamundaRestController.java:33) ~[classes/:na]
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:795) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]
... 5 common frames omitted ```
@aravindhrs, You are right, it was something wrong with my code I removed command line runner and change the code a little bit and it works. Thank you for help.
Hi @Niall, I have same type of issue when calling camunda services with REST API. The data sent with the body is not getting picked (Ex: to start a message-event we need to send the correlationKey and etc…).
I can send data with postman, unable to do the same with REST calls. My setup is
remote camunda engine,
rest api just to send the calls that we send with postman