jBPM demo in JBossWorld Keynote
jBPM was a big part of the JBossWorld keynote demo this year! The demo featured the JBoss Toy Store, a simple shopping cart application. You could use your mobile device to order various products (from phones to shirts), and a jBPM process was used to handle and manage the orders, all running in the cloud (on OpenShift).
The full video of the keynote is available here (you can skip to 14min30 if you immediately want to skip to the demo itself, which in total takes about 20min), this blog will explain some of the details on how jBPM was used to achieve this.
Whenever a new order was placed (either through one of the mobile clients or the web-based client), a process described the life cycle of the order. The process itself is shown below. The process itself is modelled using the BPMN 2.0 standard (both the visualization and the XML format used to store the process) and was defined in the web-based designer.
After some initialization, a Risk Assessment was done to decide whether the order was high or low risk. This was modelled using a Business Rule Task, that in this case used a web-based decision table to make the decision. In the demo, we simply look at the amount of the order, to decide whether it is high risk (larger than or equal to 500$) or not (less than 500$), but this could easily be extended with more complex logic.
All orders needed to go through a first Review (where a sales representative would manually check whether the order was valid and would accept or reject the order, for example to get rid of fake or unwanted orders etc.). High-risk orders would undergo an additional Vice President Review (our VP really wanted to keep control of the company). In the demo, the VP (played by Jay on stage) automatically rejected orders above 3000$ (just to make sure our participants needed to play smart to win ;)). Both review tasks were modelled using a User Task and contained various details on who to assign the task to, the data associated with the task, etc. After the review(s), the order was then either shipped (which we modelled using a domain-specific Service Task), or a rejection email was sent (using the out-of-the-box Email Service Task).
People in the audience were invited to participate in this experiment and put in orders. A leaderboard was used to show the overall progress. This showed the total amount of orders per person, and some dials and charts showing the order transaction rate, order backlog (orders still being processed), etc. The data was collected by listening to and/or querying the jBPM engine and/or task service.