/bpm-camunda-kogito-at-a-gallop

Tech talk about the developer-focussed BPM ecosystem

Primary LanguageKotlin

title separator verticalSeparator revealOptions
About BPM, Camunda, Kogito at a gallopp
<!-- section -->
^---$
transition
fade
<style> img { max-height: 300px !important; } </style>

About BPM, Camunda, Kogito at a gallopp

Timm Heuss

October 2022

https://github.com/heussd/bpm-camunda-kogito-at-a-gallop


Agenda

  • BPM and its ecosystem
  • Model our own process featuring:
    • human tasks
    • service invokes
  • Implement and deploy it...
    • ... in Camunda 7
    • ... in Kogito
  • Reflect about our impressions

BPM and it's ecosystem


How BPMN looks like


Creditworthiness Check

BPMN example - Creditworthiness Check. Taken from https://camunda.com/bpmn/examples/


Four Eyes Principle

BPMN example - Four Eyes Principle. Taken from https://camunda.com/bpmn/examples/


Terminology

  • Business Process Management (BPM)
  • Business Process Model and Notation (BPMN) - a graphical specification language, used to model a process
  • Decision Model and Notation (DMN) - used to model decisions
  • BPM suite - Engine to execute BPM

Why BPM?

  1. Economical: You might draw it (in PowerPoint) anyway, why not in a executable standard notation?
  2. Subject Matter: Business people can model the process themselves and they know it best
    • right?!
  3. Technological: Software that takes care of:
    • states and versions of processes
    • human / machine interaction

Completely unbiased comparison of approaches

Yes Code No Code
Camunda, Kogito, jBPM, lib-bpmn-engine ... ServiceNow, Signavio, ...
Developer tools Closed ecosystems
Embrace standard programming languages ?
Your best friend Death by Property panel

Camunda


├── build.gradle
├── gradle.properties
├── settings.gradle
└── src
   └── main
      ├── java
      │  └── com
      │     └── example
      │        └── hello
      │           ├── HealthController.kt
      │           ├── IdeaReceiver.kt
      │           └── SpringBootApp.java
      └── resources
         ├── application.yaml
         ├── idea-approval-process.bpmn
         ├── META-INF
         │  └── processes.xml
         └── public
            └── index.html

Hands on 🙌


Example scenario: Idea approval process

  • Step 1: Propose idea.
  • Step 2: Approve or reject idea.
  • Step 3: Send idea to service, if it is approved.

Highlights

Rich suite with everything you need. Shared, Container Managed Process Engine via SpringBoot starter

Modelling User Interface Admin Interface
Camunda Modeller (Desktop), Cawemo (Online) Camunda Task List Camunda Cockpit

Payed features: Graphical process instance migration, Analytics such as Heatmaps on processes, ...

Red Hat Kogito

Kogito


├── Dockerfile
├── pom.xml
└── src
   └── main
      ├── java
      │  └── org
      │     └── kie
      │        └── kogito
      │           └── examples
      │              ├── Idea.kt
      │              └── IdeaReceiver.kt
      └── resources
         ├── application.properties
         ├── META-INF
         │  ├── kmodule.xml
         │  └── processSVG
         │     └── idea-approval.svg
         └── org
            └── kie
               └── kogito
                  └── examples
                     └── idea-approval.bpmn2

Hands on 🫶


Highlights

Hyper-scalable Cloud-native microservice architecture, focus on Domain language and auto generation.

Modelling User Interface Admin Interface
VSCode plugin None (Task console available as dedicated service) None (Admin console available as dedicated service)

Kogito is part of

Red Hat's KIE (Knowledge Is Everything)

Impressions


"The business can model processes"

Yes they can! But keep in mind that:

  • Business might not be experienced in doing so.
  • It requires a different way of thinking that might not be natural for the Business.
  • Modeling a good process is still challenging.

What about executable processes?


Business cannot model executable processes

  • Additional attributes needed in Property panels:
    • what class to call
    • what data model to use
  • Maintaining these requires developer insights

BPMN Property panels
Business 🛑
Developer

Good practice: How to develop a process

  1. Business creates draft process.
  2. Developer review, clarify, correct, goto 1. until concept is clear.
  3. Developer add technical attributes.
  4. Process becomes part of the codebase.
  5. Process becomes new baseline for future iterations with business.

Property panels

Potential "Lock-in" effect through BPM-suite-specific attributes.

Camunda Kogito
Camunda Modeller VSCode plugin

Good practice: How to integrate BPM suites in your application

Work with REST:

  1. General management endpoints by the BPM suite.
  2. Subject matter-specific endpoints
    • Camunda: do it yourself
    • Kogito: generated automatically

UI integration: input / output forms

Management endpoints!

Also: Custom field types for Camunda


Kogito /management endpoint

/management/processes/

DELETE /management/processes/{processId}/instances/{processInstanceId}
GET /management/processes/{processId}/instances/{processInstanceId}/error
GET /management/processes/{processId}/instances/{processInstanceId}/nodeInstances
DELETE /management/processes/{processId}/instances/{processInstanceId}/nodeInstances/{nodeInstanceId}
POST /management/processes/{processId}/instances/{processInstanceId}/nodeInstances/{nodeInstanceId}
POST /management/processes/{processId}/instances/{processInstanceId}/nodes/{nodeId}
POST /management/processes/{processId}/instances/{processInstanceId}/retrigger
POST /management/processes/{processId}/instances/{processInstanceId}/skip
GET /management/processes/{processId}/nodes

UI integration: Modeling


Good practice: Process Engine as Single point of truth

UX designers might not like this.


When is a process validated?

Camunda Kogito
Model Deployment Deployment
References Element instantiation Deployment

In Camunda you have to test the entire process to ensure that all referenced classes or data types exist.


Breaking changes in Camunda 8

  • User tasks are no longer free for commercial users.
  • Only basic primary data types or JSON supported.
  • Cawemo replaced with Camunda Platform service.
  • Less choices for deployment.

https://docs.camunda.io/docs/guides/migrating-from-camunda-platform-7/


Deployment

Camunda 7 Camunda 8 Kogito
Remote Process Engine
Shared, Container Managed Process Engine
Embedded Process Engine

Kogito's Cloud-native Complexity

  • Spinning up a Camunda-equivalent service means starting 8 containers:
    • Infinispan, Apache Zookeeper, Apache Kafka, Keycloak, Kogito Data Index service, Management console, Task console
    • Plus finally your process deployable
  • Public code examples are not working out of the box.

Final thoughts

(personal opinion)

  • You have a chain of activities? States? Human-Machine-Interaction? You might need BPM.
  • BPMN is a great means for communication.
  • We are right in the middle of a transition from
    • application server BPM suites towards ...
    • Cloud-native BPM suites.
  • Yes-Code-approaches rock, yet the amount of code you don't have to write is just amazing.
  • Camunda ❤️, Kogito ❤️

Stop drawing boxes in PowerPoint.

Start modelling BPMN.