Wednesday, May 6, 2015

A Microservices Migration Story with JBoss BPM Travel Agency

Some time ago we launched a rather expansive JBoss Travel Agency demo project to show some of the more interesting feature of JBoss BPM Suite.

We provided a collection of videos that not only show you how to install it, what the various rule and process artifacts are in the project, but we also walk you through the various paths you can take during actual use of the JBoss Travel Agency process.

The project continued to expand over time, adding on not just a bookings process, but also a payment process that included advanced features like compensation (rolling back bookings), integration of traditional web services in service tasks and a credit card fraud detection system.

JBoss Fuse based microservices migration.
We have showcased this project on several online webinars, including together with PEX Processing Network.

What is left you might ask?

We thought long and hard on this before deciding that an interesting idea might be to look at migration of the existing projects web services to microservices based on JBoss Fuse technology.

Nothing like progressing into a modern enterprise architecture, right?

Demo project

As always we bring you not only a solution, but a reusable demo project you can easily spin up yourself to explore the details around how a JBoss BPM project would integrate with the microservices we migrate from existing classic web services with JBoss Fuse.

The project is called the JBoss BPM Suite & JBoss Fuse Travel Agency Integration Demo.

The original web services sources can be found in the projects directory for your convenience, but are not built by default when we run the installation.

The project installs JBoss BPM Suite 6.1 with the Travel Agency projects rules, process, forms and sub-flow. It then installs JBoss Fuse 6.1.1. and configures in the background the Camel routes, containers and deploys this into FuseFabric.

You can find more details around the JBoss Fuse setup in the article by Christina Lin.

To setup this project there are just a few simple steps to get going, but note that there are 6 containers being setup and deployed so expect an initial installation to take some minutes:

Installation

  1. Add products to installs directory.
  2. Run 'init.sh' or 'init.bat' file. 'init.bat' must be run with Administrative privileges.
  3. Containers auto setup for you!
    Start the JBoss BPM Suite server, login, build and deploy JBoss BPM Suite process project at http://localhost:8080/business-central (u:erics/p:bpmsuite1!).
  4. Add fabric server passwords for Maven Plugin to your ~/.m2/settings.xml file the fabric server's user and password so that the maven plugin can login to the fabric.
     <!-- Server login to upload to fabric. -->
     <servers>
         <server>
             <id>fabric8.upload.repo</id>
             <username>admin</username>
             <password>admin</password>
         </server>
     </servers> 
    
  5. External client web application showcasing
    RestAPI integration!
    Start Fuse Server, by running 'fuse' or 'fuse.bat':
  6. Login to Fuse management console at: http://localhost:8181 (u:admin/p:admin).
  7. Under Runtime tab, you will see 6 containers, select and start them all.
Once you are up and running just build the project in JBoss BPM Suite and start the Fuse containers as the documentation describes.

You can now run the process by submitting through the client web application at:

Looking to Automate your business?
http://localhost:8080/external-client-ui-form-1.0

The process will now be using the various microservices and show full JBoss BPM Suite and JBoss Fuse integration in an easy to explore demo project.

We hope you enjoy this one too and feel free to browse for more at JBoss Demo Central.

UPDATE: video of this project available online now.