This week we are bringing you a new project release for the JBoss BPM Suite Travel Agency project.
It was released in October this year and showed us how to excite the travel industry with a demo project that could demonstrate the following aspects in a bookings process:
- custom task forms built with forms modeler
- a sub-process example
- two separate service tasks
- hotel availability service
- flight availability service
- rules integration
- DRL rules
- decision table
- diverse guided rules
- multiple testing scenarios
Main travel agency process.
The following three features are what makes the JBoss Travel Agency project a must have for your BPM demo arsenal.
|Book holiday process with compensation.|
1. BPM compensationThe part missing in this story was the actual payment for the approved travel request by the submitting customer.
The team dug into this problem and came up with an extension to the original process that called a new sub-process called Book Holiday.
The original task form presented to the travel agent now was adjusted to ask for credit card information from the customer if the booking is approved. This information will be passed to the new sub-process for billing the fees involved with the flights and hotel rooms being booked by the customer.
|Successful path (grey) where no compensation took place.|
This new sub-process node calls a process called CompensateService where we see two separate services, one used to facilitate charging the customer for the flights and another for the hotel rooms chosen in the final booking.
Attached to these services are compensation nodes, that are triggered if there is a problem detected at the final gateway, where we then trigger the compensation to take place.
The trick here is that we create a use case where any credit card entered that starts with the numbers 1234... will be considered to belong to a list of fraudulent cards and require a roll back of the booked flights and rooms.
|Compensation took place (grey), rolled back credit charges.|
This is the compensation path (marked with red nodes) and triggers the compensation paths (marked with pink nodes) before ending the process.
When compensation takes place then the sub-process is ended, returning back to the main process which then also ends.
2. External UI to start processCompensation was not the only addition to this project, there are a few more new interesting bits to share.
First off, there is an external UI form created to start the Travel Agency process outside of the JBoss BPM Suite generated forms.
This form can be found deployed with the demo project at http://localhost:8080/external-client-ui-form-1.0 if deployed at the default localhost location.
|External UI based on RestAPI to start process instances.|
3. JSON base process clientThe final item is that for the first time we have an incubation project added into the projects directory at projects/instance-generator. This was created by EMEA Senior Solution Architect, Andrea Ubbiali and is a twist on the standard Java class that wrapped the RestAPI to start a series of process instances at once for demo purposes.
See the readme file in this project for how to build by hand and what the details are around the JSON implementation to start new process instances.
Get started today
To get started we provide a quick set of instructions to help you get the Travel Agency demo project up and running with a minimum of fuss: