Salaboy and I have developed this application at Plugtree to prove and show a lot of conceptual and architectural concepts behind JBoss Drools and jBPM projects.
The application is about an emergency service call center. It uses jBPM for define and run the company’s processes and Drools Expert to execute part of the involved Business Logic. The Demo application also uses Drools Fusion to correlate events coming form real-time sensors (a Wiimote or the keyboard) .
Emergency Service (ES) is a multi-module maven project hosted in github. So, the first 2 prerequisites are git and maven.
You can get git binaries from the project home page: http://git-scm.com/download
In the case of Ubuntu, you already have git in the repositories.
In the case of maven, you will need to have at least version 2 installed. In the case of Ubuntu, you can directly get it from the package repository. You can also download its binaries from here: http://maven.apache.org/download.html
Getting Emergency Service sources is pretty straight forward. The only thing you need to do is to clone the project from its github location:
$git clone git://github.com/Salaboy/emergency-service-drools-app.git emergency-service
After cloning the repository, you will end up with this directory structure:
I don’t want to enter in details about the project structure in this post, however this is a brief explanation of each of the modules:
Compiling the sources is a maven task. Make sure you have maven in your classpath and run:
$mvn clean install -DskipTests=true
*We are skipping test because they are kind of unstable yet 🙂
If everything works as expected, you will end up with the following message in your console:
For the City Map application we are using Slick. Slick is a 2D java library that wraps LWJGL. If you want to use slick, you need to have LWJGL in your system.
These are the steps you need to do to get LWJGL running:
When executing the demo, the order of execution of its modules is essential.
The first project you need to run is emergency-service-core:
$cd emergency-service-core $mvn exec:exec
When emergency-service-core is running, you can start emergency-service-tasklists-ui-swing or emergency-service-world-ui-slick in any order. For example:
$cd emergency-service-world-ui-slick $mvn exec:exec
The result should be:
and
$cd emergency-service-tasklists-ui-swing $mvn exec:exec
The result should be:
To start playing with the Demo, you need to start an emergency. To do this, you have to press the space bar key in the map. When you press that key, a new emergency will be displayed in the map.
In the first task list of emergency-service-tasklists-ui-swing you will see a task to be completed (you need to press the “Refresh” button.
At this point you can continue with the flow of execution: complete the first task, go to the second task list, complete it, etc.
Because the demo is not completed yet, it only supports HEART ATTACK emergencies for 1 person between 20 and 60 years old. We are working to support the all the possibilities soon.
To simulate patient heart beat, you can use a Wiimote (need to be configured in task list application) or ‘q’ and ‘w’ keys.
I tried to explain how to download, compile, configure and run the emergency service demo application.
Remember that this Demo is under heavy development, so expect changes and bugs!! 🙂
Feel free to play with it. to report any problem and to give us some feedback too!