Business Assets like decision tables, processes, or cases can now be delivered with independent and scalable services. The next step in this journey is to define the communication between client services that will consume these assets and interact with the processes and rules engine. Will the project attend to functional requirements by directly executing REST requests? Or should it use a client API to facilitate the usage of REST or JMS protocols?
There are four main ways to interact with the engine in order to consume business assets.
One of them is using the Core Engine API. This API should be used when embedding the engine. It directly interacts with Kie Deployments, Kie Base, Kie Session, and business assets. We won’t cover this API since our main goal is to deploy scalable independent services.
INFO: Detailed information about the Core Engine API can be found at: https://docs.jboss.org/jbpm/release/7.36.0.Final/jbpm-docs/html_single/#jBPMCoreEngine.
Another way is to deploy an independent engine (Kie Server) where you can deploy business projects and consume them using Kie Server APIs. Considering a remote engine, we have three options:.
- Use Java Client Kie API – an API used by Java applications to facilitate the communication via REST or JMS,
- Consume directly via the Kie REST API – generally used by front-end applications that want to interact directly with the engine,
- Consume directly via JMS protocol.
TIP: You might also hear about Fluent API, which is not related to consuming assets but, to creating assets. It allows to programmatically create process definitions using a Java API. Information and examples of the Fluent API can be found in the official documentation: https://docs.jboss.org/jbpm/release/latest/jbpm-docs/html_single/index.html#_process_fluent_api
This section focuses on concepts and tips about the usage of the Java Kie Client API. We will learn what is Java Kie Client API, how to consume business projects using REST with Kie Client API, and how to handle JMS with Kie Client API. Additionally, this chapter provides instructions on how to extend the native Kie Server API when the available one does not attend to the domain specific requirements.
In this section, we will cover the following topics:
- Getting started with Kie Server Java API
- Consuming business assets via REST
- Consuming business assets via JMS
- Extending the engine: Building custom extensions
This section is part of the jBPM Getting Started series