Kogito Example :: jBPM, OptaPlanner and SpringBoot

Flight assignment process and optimization

License

License

Categories

Categories

OptaPlanner Business Logic Libraries Constraint Satisfaction Problem Solver
GroupId

GroupId

org.kie.kogito.examples
ArtifactId

ArtifactId

jbpm-optaplanner-springboot-example
Last Version

Last Version

0.9.0
Release Date

Release Date

Type

Type

jar
Description

Description

Kogito Example :: jBPM, OptaPlanner and SpringBoot
Flight assignment process and optimization
Project Organization

Project Organization

JBoss by Red Hat

Download jbpm-optaplanner-springboot-example

How to add to project

<!-- https://jarcasting.com/artifacts/org.kie.kogito.examples/jbpm-optaplanner-springboot-example/ -->
<dependency>
    <groupId>org.kie.kogito.examples</groupId>
    <artifactId>jbpm-optaplanner-springboot-example</artifactId>
    <version>0.9.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.kie.kogito.examples/jbpm-optaplanner-springboot-example/
implementation 'org.kie.kogito.examples:jbpm-optaplanner-springboot-example:0.9.0'
// https://jarcasting.com/artifacts/org.kie.kogito.examples/jbpm-optaplanner-springboot-example/
implementation ("org.kie.kogito.examples:jbpm-optaplanner-springboot-example:0.9.0")
'org.kie.kogito.examples:jbpm-optaplanner-springboot-example:jar:0.9.0'
<dependency org="org.kie.kogito.examples" name="jbpm-optaplanner-springboot-example" rev="0.9.0">
  <artifact name="jbpm-optaplanner-springboot-example" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.kie.kogito.examples', module='jbpm-optaplanner-springboot-example', version='0.9.0')
)
libraryDependencies += "org.kie.kogito.examples" % "jbpm-optaplanner-springboot-example" % "0.9.0"
[org.kie.kogito.examples/jbpm-optaplanner-springboot-example "0.9.0"]

Dependencies

compile (4)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-web jar
org.springframework.boot : spring-boot-devtools Optional jar
org.kie.kogito : kogito-springboot-starter jar
org.optaplanner : optaplanner-spring-boot-starter jar

provided (1)

Group / Artifact Type Version
javax : javaee-api jar 8.0

runtime (4)

Group / Artifact Type Version
org.webjars : webjars-locator jar 0.37
org.webjars : bootstrap jar 4.3.1
org.webjars : font-awesome jar 5.11.2
org.webjars : momentjs jar 2.24.0

test (1)

Group / Artifact Type Version
org.springframework.boot : spring-boot-starter-test jar

Project Modules

There are no modules declared in this project.

Kogito Examples

This module contains a number of examples that you can take a look at and try out yourself. Please take a look at the readme of each individual example for more details on how the example works and how to run it yourself (either locally or on Kubernetes).

Since Kogito aims at supporting both Quarkus and Spring Boot each example usually provides both type of projects.

Contribution

Everyone is encouraged to contribute to these examples by

  • trying it out and providing feedback and ideas for improvement
  • create new examples -- in this case, make sure your PR is against the master branch!
  • blogging about it
  • using it on conferences and workshops

Process hello world with scripts

shows most basic use of processes to build up a hello world example

Process with business rules

shows integration between processes and rules.

Process with Kafka

shows how message start and end events can be easily used to integrate with Apache Kafka to consume where message name is the Kafka topic and the payload is mapped to process variable. Uses custom types that are serialized into JSON.

Process with Infinispan persistence

shows long running processes with Infinispan persistence so the state of process instances can be preserved across service restarts.

Process with service invocation

shows how easy it is to use local services to be invoked from within process. Allows easy and readable service invocation use cases to be covered.

Process with REST call

shows REST service invocation and parsing data back to an object instance used as process variable.

Process with user tasks

shows user task interactions with four eye principle applied

Process with user tasks based on custom life cycle

shows user task interactions with four eye principle applied that supports custom life cycle that allows to add additional phases to user tasks to indicate other states.

Process with user tasks with security on REST api

shows user task interactions with four eye principle applied with security restrictions on REST api.

Process with timers

shows timers (intermediate and boundary) that allows to introduce delays in process execution

Other Misc Examples

  • Onboarding example combining 1 process and two decision services: see README.md
  • Rules on Quarkus: see README.md
  • Rules on Quarkus with Unit: see README.md
  • Process on Quarkus: see README.md
  • Process on Spring Boot: see README.md

Trying the examples with the Kogito Operator

Every example has a directory named operator including the YAML files to deploy it using the Kogito Operator in an OpenShift cluster. Please refer to the Kogito Documentation of how to install the operator to your environment in order to try it there.

org.kie.kogito.examples

KIE (Drools, OptaPlanner and jBPM)

Code of the Drools rule engine, OptaPlanner constraint solver and jBPM workflow engine.

Versions

Version
0.9.0
0.8.1