https://github.com/khalidbourr/b2xklaim
B2XKlaim: Translates BPMN diagrams into executable multi-robot coordination code, letting users design robot missions visually instead of writing code.
https://github.com/khalidbourr/b2xklaim
bpmn code-generation coordination dsl mission-design multi-robot process-modeling
Last synced: 2 months ago
JSON representation
B2XKlaim: Translates BPMN diagrams into executable multi-robot coordination code, letting users design robot missions visually instead of writing code.
- Host: GitHub
- URL: https://github.com/khalidbourr/b2xklaim
- Owner: khalidbourr
- License: apache-2.0
- Created: 2023-10-23T00:19:20.000Z (over 2 years ago)
- Default Branch: development
- Last Pushed: 2026-04-04T13:27:14.000Z (3 months ago)
- Last Synced: 2026-04-04T15:55:31.594Z (3 months ago)
- Topics: bpmn, code-generation, coordination, dsl, mission-design, multi-robot, process-modeling
- Language: Java
- Homepage: https://kbourr.com/b2xklaim/
- Size: 1.22 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# B2XKlaim
**B2XKlaim** translates BPMN Collaboration diagrams into [X-Klaim](https://github.com/LorenzoBettini/Xklaim) skeleton code for developing multi-robot missions. It bridges the gap between high-level process modeling and executable multi-robot coordination by automatically generating X-Klaim programs from visual BPMN specifications.
## How It Works
B2XKlaim follows a **model-driven development** pipeline:
1. **Design** — Model your multi-robot mission as a BPMN Collaboration diagram using the built-in web editor (powered by [bpmn-js](https://github.com/bpmn-io/bpmn-js)). Each pool represents a robot or participant, and message flows capture inter-robot communication via tuple spaces.
2. **Parse** — The backend parses the `.bpmn` XML, extracting pools, tasks, gateways, events, and message flows into an intermediate representation.
3. **Translate** — A set of mapping rules transforms each BPMN element into its X-Klaim counterpart: pools become `net` declarations, message flows map to `out`/`in` operations on tuple spaces, XOR gateways translate to conditionals, AND gateways to parallel constructs, EB gateways to timeout-based routing (`if … within`), LP gateways to `while` loops, and tasks become `proc` bodies.
4. **Generate** — The tool outputs a structured `.xklaim` package:
```
src/main/java/xklaim/
├── Collaboration.xklaim # net definition
├── processes/ # one proc per pool
├── tasks/ # script task stubs
└── branches/ # AND gateway branches
```
The generated code is downloadable as a ready-to-compile project for the X-Klaim runtime with ROS 2 integration.
BPMN Collaboration diagram designed in the B2XKlaim editor
Generated X-Klaim code output
### X-Klaim
To compile and run the generated code, you need [X-Klaim](https://github.com/LorenzoBettini/xklaim):
- **Eclipse update site**: https://lorenzobettini.github.io/xklaim-releases/
- **Eclipse distributions with X-Klaim pre-installed**: https://sourceforge.net/projects/xklaim/files/products/
## Supported BPMN Elements
| Category | Elements |
|----------|----------|
| **Gateways** | XOR (Exclusive), AND (Parallel), EB (Event-Based), LP (Loop) |
| **Events** | Start, Intermediate, End — None, Message, Signal, Timer variants |
| **Tasks** | Script Task, Call Activity |
| **Structure** | Pools, Message Flow, Event Subprocess |
## Setup
### Backend (Java 21 + Spring Boot)
```bash
cd B2XKlaim/B2XKlaim-BackEnd
mvn clean install -DskipTests
mvn clean compile
```
Then run `B2XKlaimApplication`.
### Frontend (Vue 3 + bpmn-js)
```bash
cd B2XKlaim/B2XKlaim-FrontEnd
npm install
```
### Run
```bash
cd B2XKlaim
npm start
```
Draw a BPMN Collaboration diagram in the editor, hit **Translate**, and download the generated X-Klaim code.
## How to Use
See the full guide: [How to use B2XKlaim](https://kbourr.com/how-to-use-b2xkaim-tool/)
A hosted version is available at [kbourr.com/bxklaim](https://kbourr.com/bxklaim) — a new release will be deployed soon.
## References
If you use B2XKlaim in your research, please cite:
> K. Bourr, F. Tiezzi, L. Bettini, and S. Seriani, "Translating BPMN models into X-KLAIM programs for developing multi-robot missions," *International Journal on Software Tools for Technology Transfer*, pp. 1–19, 2026, Springer.
> K. Bourr, F. Tiezzi, and L. Bettini, "Model-driven development of multi-robot systems: from BPMN models to X-Klaim code," in *International Symposium on Leveraging Applications of Formal Methods (ISoLA)*, pp. 224–242, 2024, Springer.
BibTeX
```bibtex
@article{bourr2026translating,
title = {Translating BPMN models into X-KLAIM programs for developing multi-robot missions},
author = {Bourr, Khalid and Tiezzi, Francesco and Bettini, Lorenzo and Seriani, Stefano},
journal = {International Journal on Software Tools for Technology Transfer},
pages = {1--19},
year = {2026},
publisher = {Springer}
}
@inproceedings{bourr2024model,
title = {Model-driven development of multi-robot systems: from BPMN models to X-Klaim code},
author = {Bourr, Khalid and Tiezzi, Francesco and Bettini, Lorenzo},
booktitle = {International Symposium on Leveraging Applications of Formal Methods},
pages = {224--242},
year = {2024},
organization = {Springer}
}
```
## License
See [LICENSE](LICENSE) for details.