This repository contains the materials to show how to integrate Bonita BPM with Chain.
The use case demonstrated in this demo is a car supply chain.
This demo has been built using the Community Edition of Bonita BPM.
A more complex demo that has been built with the Subscription edition of Bonita BPM can be viewed in this [recording] (https://www.bonitasoft.com/for-you-to-read/videos/accelerate-blockchain-technology-adoption-bonita-bpm-and-chain-core-0)
To run the demo on your machine you will need the following elements:
-
Start Chain core and connect to Test Network
-
Clone this project on your local machine
-
Open a terminal in this repository
-
Build the project InitChain
cd InitChain
mvn package
- Run the project InitChain to init the Chain Test Network with the data for the demo
mvn exec:java -Dexec.mainClass="org.bonitasoft.chain.InitDemoSupplyChain"
- Start Bonita Studio
- Import the process
- Open the Portal
- Import the organization provided
- Associate a User profile to all users. Easy way to achieve that is to map the User profile to the role "member"
- Run the process
On startup, the process will display the initialization form. Enter the following information:
- Username: johnDoe
- Car reference: bonitaWhiteCar
Then submit the task.
Log in as storeManager to display the next task: Review order. As storeManager, grab the task and accept it.
Refresh your task list to display the next tasK: Notify delay to customer. Grab the task and click on "Client accept"
Log in as productionManager to display the next task: Order a new car. As productionManager, grab the task, enter a date and submit it.
This will issue a new asset to the blockchain. You can see the transaction in the Chain dashboard.
Log in as storeManager to display the next task: Notify for availability. As storeManager, grab the task and submit it.
This will transfer the car asset from the store account to john doe account in the blockchain. You can see the transaction in the Chain dashboard.
If you interested in building your own application with Bonita BPM and Chain, you can find the source code of the connectors here: Chain connectors for Bonita