jBPM as AI Orchestration Platform

Author: Sergey Lukyanchikov, C-NLTX/Open-Source Disclaimer: The views expressed in this document reflect the author's subjective perspective on the current and potential capabilities of jBPM. This text presents jBPM as a platform for orchestrating external AI-centric environments, such as Python, used for designing and running AI solutions. We will provide an overview of jBPM’s most relevant functionalities for AI orchestration and walk you through a practical example that demonstrates its effectiveness as an AI orchestration platform: Figure 1 Stroke Prediction solution deployed in jBPM is run by the users of OpenEMR In Brief: About jBPM jBPM (Java Business Process Management) is an open-source integration platform with a workflow engine at its core. Although the jBPM project defines itself as a BPM (Business Process Management) or workflow engine, toolkit, or suite, we argue that describing it as an integration platform is more precise. The features that support this characterization include: · Exposing business logic implemented in jBPM for external access – e.g., via REST API: Figure 2 A REST API call to jBPM resulting in a response (ID: 976) with status 201 (“success”) · Providing an engine for business process automation: Figure 3 Web-based workflow editor, part of jBPM’s business process automation engine · Embedding components for interaction with external providers – e.g., with Python: Figure 4 jBPM’s project-level dependency configurator displaying a dependency record for the Jep extension These capabilities enable jBPM to interact with external systems, make automation decisions, and manage callouts to external providers efficiently. How jBPM Orchestrates Python jBPM’s Python integration can be implemented in various ways. Our current approach utilizes Jep (Java Embedded Python), a Java extension that allows interaction with Python interpreters. When combined with jBPM’s business process automation (e.g., script task activity), this enables a solid, foundational level of Python orchestration: Figure 5 A script task executing Python code wrapped in Java via Jep within a jBPM business process Although Jep enables Python integration, it has usability barrier that may require workarounds during initial implementation. A Practical Example: Stroke Prediction A comprehensive illustrative example of jBPM orchestrating Python is our solution for training AI models and estimating stroke risk in a set of patients. In a hospital or clinical setting, physicians use an EMR (Electronic Medical Record) system like open-source OpenEMR (or any other software allowing customization of user screens). Stroke prediction requests may originate from various sections of the EMR, typically within a patient’s file: Figure 6 A standard patient file screen in jBPM with a Health AI Solution Catalog The physician selects the Stroke Prediction AI solution and submits a prediction request to jBPM, where the AI logic is deployed: Figure 7 The patient file screen displaying stroke risk prediction results jBPM processes the request, orchestrating the AI logic and Python computations, and returns the estimated stroke risk to OpenEMR: Figure 8 Process instance logging screen in jBPM displaying a prediction request (ID: 977) from a physician The stroke risk is initially calculated in jBPM before being returned to OpenEMR for the physician: Figure 9 The process instance record (ID: 977) in jBPM displays the computed stroke risk to be returned to OpenEMR This prediction workflow, when visualized end-to-end, appears as follows: Figure 10 End-to-end flow of stroke prediction across OpenEMR and jBPM Meanwhile, an analyst monitoring the AI models’ performance can retrain and publish updated models: Figure 11 Custom Health AI screen in OpenEMR for training AI models via jBPM Similar to the physician’s workflow, the analyst selects the AI solution and submits a train/validate/test request to jBPM: Figure 12 Custom Health AI screen displaying outcomes of train/validate/test requests jBPM logs and executes the training process: Figure 13 Process instance logging screen in jBPM displaying a train/validate/test request (ID: 978) from an analyst Results are computed and returned to OpenEMR: Figure 14 Process instance record in jBPM displaying computed accuracy metrics to be returned to OpenEMR Load testing confirms that jBPM efficiently handles simultaneous user requests for both prediction and model training without bottlenecks or data leaks: Figure 15 OpenEMR screens displaying stroke prediction and model training results from load testing What Makes jBPM an AI Orchestration Platform? Given its ability to orchestrate AI workflows, one may ask: Does jBPM have sufficient surrounding functionality to be considered a full-fledged AI orchestration platform? Let’s examine the ecosystem around jBPM. Its “nearest neighbor” is likely Eclipse, the preferred IDE (Integrated Develo

Apr 13, 2025 - 16:51
 0
jBPM as AI Orchestration Platform

Author: Sergey Lukyanchikov, C-NLTX/Open-Source

Disclaimer: The views expressed in this document reflect the author's subjective perspective on the current and potential capabilities of jBPM.

This text presents jBPM as a platform for orchestrating external AI-centric environments, such as Python, used for designing and running AI solutions. We will provide an overview of jBPM’s most relevant functionalities for AI orchestration and walk you through a practical example that demonstrates its effectiveness as an AI orchestration platform:

Image description
Figure 1 Stroke Prediction solution deployed in jBPM is run by the users of OpenEMR

In Brief: About jBPM

jBPM (Java Business Process Management) is an open-source integration platform with a workflow engine at its core. Although the jBPM project defines itself as a BPM (Business Process Management) or workflow engine, toolkit, or suite, we argue that describing it as an integration platform is more precise.

The features that support this characterization include:

· Exposing business logic implemented in jBPM for external access – e.g., via REST API:

Image description
Figure 2 A REST API call to jBPM resulting in a response (ID: 976) with status 201 (“success”)

· Providing an engine for business process automation:

Image description
Figure 3 Web-based workflow editor, part of jBPM’s business process automation engine

· Embedding components for interaction with external providers – e.g., with Python:

Image description
Figure 4 jBPM’s project-level dependency configurator displaying a dependency record for the Jep extension

These capabilities enable jBPM to interact with external systems, make automation decisions, and manage callouts to external providers efficiently.

How jBPM Orchestrates Python

jBPM’s Python integration can be implemented in various ways. Our current approach utilizes Jep (Java Embedded Python), a Java extension that allows interaction with Python interpreters. When combined with jBPM’s business process automation (e.g., script task activity), this enables a solid, foundational level of Python orchestration:

Image description
Figure 5 A script task executing Python code wrapped in Java via Jep within a jBPM business process

Although Jep enables Python integration, it has usability barrier that may require workarounds during initial implementation.

A Practical Example: Stroke Prediction

A comprehensive illustrative example of jBPM orchestrating Python is our solution for training AI models and estimating stroke risk in a set of patients. In a hospital or clinical setting, physicians use an EMR (Electronic Medical Record) system like open-source OpenEMR (or any other software allowing customization of user screens). Stroke prediction requests may originate from various sections of the EMR, typically within a patient’s file:

Image description
Figure 6 A standard patient file screen in jBPM with a Health AI Solution Catalog

The physician selects the Stroke Prediction AI solution and submits a prediction request to jBPM, where the AI logic is deployed:

Image description
Figure 7 The patient file screen displaying stroke risk prediction results

jBPM processes the request, orchestrating the AI logic and Python computations, and returns the estimated stroke risk to OpenEMR:

Image description
Figure 8 Process instance logging screen in jBPM displaying a prediction request (ID: 977) from a physician

The stroke risk is initially calculated in jBPM before being returned to OpenEMR for the physician:

Image description
Figure 9 The process instance record (ID: 977) in jBPM displays the computed stroke risk to be returned to OpenEMR

This prediction workflow, when visualized end-to-end, appears as follows:

Image description
Figure 10 End-to-end flow of stroke prediction across OpenEMR and jBPM

Meanwhile, an analyst monitoring the AI models’ performance can retrain and publish updated models:

Image description
Figure 11 Custom Health AI screen in OpenEMR for training AI models via jBPM

Similar to the physician’s workflow, the analyst selects the AI solution and submits a train/validate/test request to jBPM:

Image description
Figure 12 Custom Health AI screen displaying outcomes of train/validate/test requests

jBPM logs and executes the training process:

Image description
Figure 13 Process instance logging screen in jBPM displaying a train/validate/test request (ID: 978) from an analyst

Results are computed and returned to OpenEMR:

Image description
Figure 14 Process instance record in jBPM displaying computed accuracy metrics to be returned to OpenEMR

Load testing confirms that jBPM efficiently handles simultaneous user requests for both prediction and model training without bottlenecks or data leaks:

Image description
Figure 15 OpenEMR screens displaying stroke prediction and model training results from load testing

What Makes jBPM an AI Orchestration Platform?

Given its ability to orchestrate AI workflows, one may ask: Does jBPM have sufficient surrounding functionality to be considered a full-fledged AI orchestration platform?

Let’s examine the ecosystem around jBPM. Its “nearest neighbor” is likely Eclipse, the preferred IDE (Integrated Development Environment) for jBPM, particularly due to plugins like Eclipse BPMN2 Modeler:

Image description
Figure 16 A jBPM business process edited in Eclipse (offline)

Eclipse enhances jBPM by enabling offline development. The aforementioned plugins allow developers to perform most tasks locally that jBPM’s web-based client supports. Moreover, as a highly extensible modular IDE, Eclipse provides tools to meet virtually any requirement faced by development teams.

Another key “neighbor” is PostgreSQL, one of several database engines that can be configured to support jBPM’s underlying data structures:

Image description
Figure 17 Internal jBPM tables deployed in PostrgreSQL

PostgreSQL’s ability to store jBPM’s technical data unlocks vast opportunities for data mining and optimizing AI solutions deployed within jBPM.

In this context, it is logical to mention another key “neighbor” – BIRT (Business Intelligence Reporting Tool) – BIRT is one of open-source BI engines capable of extracting, transforming, and reporting on both technical and business data managed by jBPM:

Image description
Figure 18 BIRT maintaining reporting structures and visualizing jBPM data

Together, Eclipse, PostgreSQL, and BIRT, along with jBPM’s core capabilities, form a robust AI orchestration platform that facilitates AI model deployment, execution, and optimization.

For more: C-NLTX/Open-Source