惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

U
Unit 42
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
IT之家
IT之家
Blog — PlanetScale
Blog — PlanetScale
罗磊的独立博客
V
V2EX
Vercel News
Vercel News
Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tailwind CSS Blog
I
InfoQ
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
H
Help Net Security
腾讯CDC
D
Docker
P
Proofpoint News Feed
GbyAI
GbyAI
博客园 - 三生石上(FineUI控件)
aimingoo的专栏
aimingoo的专栏

Comments for OpenSource.net

Orchestrating AI in clinical settings with jBPM – OpenSource.net jBPM as AI Orchestration Platform – Part 1 – OpenSource.net Apache OpenServerless is the easiest way to build your cloud native AI application – OpenSource.net Loops in Bash for command-line power users – OpenSource.net Preserving Open Values in artificial intelligence – OpenSource.net TLS and networking – OpenSource.net Security and cryptography algorithms: A guide – OpenSource.net Essential Python web security – OpenSource.net Advanced strings with Apache Groovy – OpenSource.net Crucial lessons for Artificial intelligence – OpenSource.net
jBPM as an AI orchestration platform – Part 2 – OpenSourc...
Sergey Lukyanchikov · 2025-06-17 · via Comments for OpenSource.net

Python’s popularity for designing and running AI solutions makes it a primary objective to integrate in business logic via jBPM. Part two of jBPM as AI Orchestration Platform series presents jBPM as a platform for orchestrating external AI-centric environments. If you missed it, check out part one of this three-part series.

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:

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

Although Jep enables Python integration, it has a usability barrier that may require workarounds during initial implementation. We are describing below some of the most useful workarounds.

Assuming that Eclipse is used as the IDE (more rationale found in Part 1 of this series), let us consider adding the QuickShell extension to our Eclipse setup to enable debugging of Java code with embedded Python, in a Java shell:

A portion of Java code with embedded Python code selected for execution using QuickShell
A portion of Java code with embedded Python code selected for execution using QuickShell

The fact that our code runs well using QuickShell does not immediately guarantee its smooth execution in jBPM, but it can definitely make debugging the Java part of our code more efficient (compared to using only jBPM for debugging).

The implementation of multi-threading in various versions of Python, the interfacing options and conventions of Python’s C API, and the compliance (or lack thereof) of various Python modules with those conventions—all of that, crowned by Jep’s own implementation of multi-threading handling—is the next and most important reason for empirical workarounds. These are based on concrete use cases and are implemented by us as solutions addressing specific needs.

Taking the Stroke Prediction solution as an illustration (described in more detail in Part 3 of this series), the following “measure” ensures proper concurrent functioning of the several jBPM processes comprising the solution:

Removing the reference to the threading module from a dictionary of imported Python modules
Removing the reference to the threading module from a dictionary of imported Python modules

Again, this fix is substantial, but it still does not free us from the necessity of testing our solution end-to-end upon practically every change—and adding other workarounds. As an example of such a use-case-driven workaround, let us consider the following one:

Enabling error-free programmatic construction of Python variable names with subsequent evaluation of respective variables
Enabling error-free programmatic construction of Python variable names with subsequent evaluation of respective variables

Despite its somewhat basic look and feel (in addition to all the various workarounds to bear in mind), Jep’s strongest advantage is that it enables Python orchestration in jBPM without requiring customization—neither of jBPM for Jep, nor of Jep for jBPM.

With Python integration in place, jBPM orchestrates Python by automating the workflows required by a specific use case. While the automation capabilities of jBPM are impressive, the most practical functionality seems to be the script task activity in a jBPM process. Depending on whether we edit a jBPM process locally in Eclipse or directly on the jBPM server, a script task activity edit implementation will look slightly different, still resulting in identical orchestration behavior in jBPM compared to Python:

Editing a script task element in a jBPM process locally in Eclipse
Editing a script task element in a jBPM process locally in Eclipse
Editing a script task element in a jBPM process on jBPM server
Editing a script task element in a jBPM process on jBPM server

Once committed, compiled, and deployed on the jBPM server, our edits go live under their respective processes. Their execution status can be viewed in the jBPM server’s process instance browser:

A visual log in the jBPM process instance browser
A visual log in the jBPM process instance browser

For more details, check out the code and documentation on the project’s GitHub repository.

For more: C-NLTX/Open-Source

Read Part 1 or Part 3: Orchestrating AI in clinical settings with jBPM

  • Sergey Lukyanchikov

    I design-to-market development, deployment and production accelerators for in-platform computations. I have contributed to the evolution of product offering at well-known data platform vendors. My LinkedIn: https://www.linkedin.com/in/lukyanchikov/

    View all posts