Reputation: 80
We have a standalone camunda instance and a client api endpoint is connected with this instance via rest api calls. I need to customize some rest api of camunda because there are some cases like getting task list and process variables together via rest calls. Getting task list first and then getting process variables for each task doesn’t works for me because there will be cases with thousands of tasks.This will cause too much burden on network. Because of some reasons, I can't use embedded version of Camunda so I have to handle this via rest calls. Is there any way to realize this?
Upvotes: 3
Views: 1706
Reputation: 7583
You can create your own REST API as suggested in previous answers. If you want to extend the CAMUNDA REST API under then same endpoint then this is also possible. However, CAMUNDA does not use Spring for its API, but JAX-RS (Jersey in Spring Boot).
Therefore the registration needs to be done as shown here: https://github.com/rob2universe/camunda-custom-rest-endpoint/blob/main/custom-endpoint/src/main/java/org/camunda/example/api/config/MyResourceConfigCustomizer.java
Then the implementation can look similar to this: https://github.com/rob2universe/camunda-custom-rest-endpoint/blob/main/custom-endpoint/src/main/java/org/camunda/example/api/CustomRestService.java
Even if you implement your own service to create a more efficient query, I would suggest to question the requirements to join full process data on thousands of tasks. This is not a list a human will read through, so maybe a (paginated) search will do.
Upvotes: 2
Reputation: 1
Set a customized springboot serlvet context-path,be sure the value isn't "camunda", like this:
server:
servlet:
context-path: /workflow
It worked for me.
Upvotes: 0
Reputation: 31
I guess you will need to build your own rest API and call Camunda via Java API
Upvotes: 1