Search code examples
javaspring-bootoptaplanner

optaplanner-spring-boot-starter vs kie-server-spring-boot-starter


I have developed a complete working spring boot project for task assignment using optaplanner-spring-boot-starter as a dependency, but the requirement is to use kie-server-spring-boot-starter-optaplanner for the same.

I have gone through the official documentation form optaPlanner and RedHat PAM business optimizer. But still confused regarding the best solution, As integrating KIE server with spring-boot and running it over tomcat will be an effort. Also, we cannot annotate the solverManager, we need to manually create an XML and pass the constraints, when using kie-server-spring-boot-starter-optaplanner.

Is there any example where I can find kie-server-spring-boot-starter-optaplanner integration with spring-boot? What is the main difference between these two dependencies, In which scenarios these should be used?


Solution

  • You probably want to the optaplanner-spring-boot-starter, especially if you're already using that and happy with it. optaplanner-spring-boot-starter is the way to use OptaPlanner on Spring Boot, similar on how optaplanner-quarkus is the way to use OptaPlanner on Quarkus: it's full featured and under active maintenance. It has a minimalist approach to dependencies, just like any other spring boot starter, so it follows the Spring philosophy. If there's any issues with it, report it on the community optaplanner-dev mailing list.

    kie-server-spring-boot-starter-optaplanner includes kie-server. If you're integrating with jBPM for human task assignment, take a look at the integration Walter wrote for that: https://github.com/kiegroup/droolsjbpm-integration/tree/master/kie-server-parent/kie-server-services/kie-server-services-task-assigning - it's explained in the kie server documentation.