Using Kogito for optimal Camunda 8 Services
Introduction
Using Kogito for optimal Camunda 8 Services
Introduction
When you digitalize your business processes with Camunda 8 and after the definition of the processes, you will have to take care of the direct implementation of the services and connectors.
Let me show you a strategy, a tool, with which we develop Camunda 8 services and connectors that enable the project owner, stakeholders, scrum master, tester, and especially the developer to rock their project in an effective and efficient way equally.
The question is: Can we also use all the benefits of BPMN in these services without compromising on high-quality code?
In fact, we achieve more if we use Kogito: We even improve the code. The project goals are reached earlier, the code is documented, the code is tested, the testers understand the automatic tests, the stakeholders also know during implementation who, why, and how long someone is working on something.
As a side effect, each part of our service is reusable in other projects. We expanding an in-house low-code stack with every new service.
Important for Stakeholders, Product Owners and Scrum Masters
- We use one language to describe everything in our project.
- The definition of the User Stories is improved.
- The need for code refactoring is greatly reduced.
Goal of This Article
In this article, i want to show you the approach of building efficient services with Kogito. At this point, we do not discuss Java programming, Camunda and Kogito modeling, security, etc.
Camunda 8 Process
Let’s start with a simple Camunda 8 process that contains a single Service Task.

We configure this process so that it has the type “kogito” and configure two variables that we pass to the external task.

Kogito JobWorker
To serve a Camunda 8 Service Task, we need to ask Camunda if any Service Tasks need to be processed. Our JobWorker does this. At this point, only the “Short Poll” is implemented to simplify the example.

Kogito JobHandler
The activated jobs are further processed in the JobHandler. This JobHandler processes the Camunda data, calls the actual service, and after completing the service, the JobHandler closes the Camunda Service Task and passes the results.

Kogito Service
Our example service generates a sentence from the given data and passes it back to the JobHandler.

Advantages
Let’s start with the biggest advantages:
- Services are modeled!
- In the refinement phase, functionalities and processes are modeled with precision. This approach enables not only the detailed modeling of the service process and its individual tasks but also allows for the direct inclusion of data and external systems in the refinement. This comprehensive modeling ensures a thorough understanding and planning of the service from the outset.
- After the refinement, the service is completely described.
- Services are understood more deeply by all project participants!
- In complex processes, encapsulation is much easier.
- Every service step is reusable.
- Every service step is individually tested.
But…
Let’s answer the most important questions that project participants ask in their role at this point.
Developer
Q: What is it like to develop with Kogito?
A: Super easy, when developing with Kogito, we reduce bloat code almost to zero.
Q: We have a BPMN engine with Camunda 8, do we need another one?
A: What we produce with Kogito is Java code. This code can be compiled natively with GraalVM. The chosen example runs entirely in memory.
In the given context Kogito should be compared more to Lombok than to Camunda.
Q: If I write my services myself, I can test them completely. Is that possible with Kogito too?
A: Yes, both unit tests and integration tests are possible and should be included in every service.
Q: We agreed to adopt an API-First approach in our team’s development process. Does Kogito support that too?
A: Yes, everywhere. Here’s an example.
Under the properties of a process, the process variables are defined.

Let’s look at the input variables of the ComplexServiceExample process. We see the process has four variables. We have defined “inputVariables” as a Java Map and “activatedJob” is a complex variable of type io.camunda.zeebe.client.api.response.ActivatedJob.
Start the example (read the Readme) and start it with “mvn quarkus:dev” and after starting press “d”. In the Quarkus Dev UI, select SwaggerUI.

Q: But the scripts in the process are …?!
A: Java!

Q: Can I use all Java Dependencies?
A: Yes, however, if we want to compile it natively, we need to ensure that all “Java-Reflection” are known at translation time.
Q: Can we develop TestDriven?
A: Since the process and the input/output parameters of the service are already defined in the refinement phase, the tests can be written before and during development. Perfect TestDriven Development.
Q: Is it fast?
A: Oh yes!
Project Managers
Q: Do we have to license anything?
A: Kogito is Open Source and is published under the Apache License.
Q: Is development more cost-effective?
A: Yes, mainly because of 3 factors.
- The definition of services (thus the stories) is more precise and therefore much less prone to errors, refactoring is greatly reduced.
- The integration of surrounding systems can be defined and tested much earlier.
- The program code is perfectly documented at any time.
Code and Examples
- https://github.com/Marcin-Pankowski/Camunda-8-Servicetasks-with-Kogito
- https://github.com/apache/incubator-kie-kogito-examples
Do you want to read more about Kogito? Write a comment to this article.
German Translation : www.piu.de
메타데이터
- post_id
- 20c85be0f2d2
- slug
- using-kogito-for-optimal-camunda-8-services-20c85be0f2d2
- url
- https://medium.com/@www.piu.de/using-kogito-for-optimal-camunda-8-services-20c85be0f2d2
- canonical_url
- https://medium.com/@www.piu.de/using-kogito-for-optimal-camunda-8-services-20c85be0f2d2
- author_url
- https://medium.com/@www.piu.de
- status
- ok
- fetched_at
- 2026-07-24 01:36:57