Friday, October 31, 2014

How To Excite the Travel Industry With a BPM Story

Travel agency booking process
One of the most interesting branches for talking about processes is the travel industry.

All across the Internet you will find references to solutions, offerings and products that try to align with the travel industry BPM solutions.

Whether you are talking to an airline, a baggage handler, a bookings agency or anything in between, they all have one thing in common. They are dealing with complex business processes that often have a need to combine rules, events and processes.

Sub-process to calculate totals (rules)
Within the JBoss BPM Suite product you will find exactly that, the tools and theory brought together in a single workbench to make your travel solutions into reality.

In this article we present a brand new JBoss BPM Suite demo project that is simulating a travel agency booking system.

This project was put together by a couple of colleagues in the UK, Niraj Patel and Shepherd Chengeta. I got the chance to spend a few days with them onsite in their offices there and we brainstormed some of the details you will find encapsulated within this project.

It is a job very well done on their part!

The Travel Agency Demo will ask for the customers initial booking information, once submitted various backend services are used to request hotel information and flight information, the final itinerary with full overview is presented for validation or review depending on the rules outcome.

The project includes all of the following:

  • 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

Completed booking information for approval.

The demo will be given to you in a foolproof installation to get you started, then show you a complete online travel agency project you can experiment with, provide a completed travel agency project for your evaluation needs, and follow up later with video content around the creation and execution of this demo.

Quickstart

  1. Add products to installs directory.
  2. Run 'init.sh' or 'init.bat' file.
  3. Start JBoss BPMS Server by running 'standalone.sh' or 'standalone.bat' in the /target/jboss-eap-6.1/bin directory.
  4. Login to http://localhost:8080/business-central
    - login for admin and other roles (u:erics / p:bpmsuite1!)
    

The form presented initially to submit a travel request can be adjusted in the Number of Travelers field, with 6 giving one path through the process and 2 another, feel free to experiment with this.

Booking a trip to Edinburgh (just one scenario)

  1. Build & deploy project.
  2. Start process with following data in start form:
    Name: [your-name]
    
    Email Adress: [any-email]
    
    Number of Travellers: 6
    
    From Destination: London
    
    To Destination: Edinburgh
    
    Preferred Date of Departure: 2014-06-06
    
    Preferred Data of Arrival: 2014-06-10
    
    Other Details / Notes: [any-text]
    
  3. Two web services will be run and a sub-process to calculate the cost before deciding it is not needed that this booking be reviewed on pricing, so you will find a task 'Employee Booking' for you to process.
  4. Fill in the form provided for the task, it allows review of all the booking data submitted, generated by services and calculated by the rules. You can request a review to send it back for a pricing review or check the completed box to finish the task and process.
  5. To trigger different path for evaluation, just change the 'Number of Travellers: 2' in initial submission form.
We hope you enjoy this project and all feedback is welcome, including any improvements you might want to push back into the project.

Wednesday, October 29, 2014

Launching Into the Clouds With 2 New OpenShift Primer bpmPaaS Quickstarts

Are you ready for BPM in the Cloud?

That was the question we asked you last week when we presented you with the first two bpmPaaS quickstarts, a generic loan project and a mortgage project.

If you were not yet ready, you will be now with the following two brand spanking new primer bpmPaaS quickstart projects.

Let's get started and help you setup this automated cartridge installation that kick start you with pre-loaded demo projects.

First you need to have an account on OpenShift Origin, which you then can upgrade for free to the Bronze level.

HR Employee Rewards
This gives you access to the creation of MEDIUM sized gears which you will need for the bpmPaaS instances you create.

After that you can then create a new application via the online web administration console, where at the bottom of the page you will find a text box labeled Code Anything.

Paste cartridge URI, easy peasy!
This is a field where you can paste in one of the cartridge definitions we provide in the projects listed below.

Just follow each projects readme file instructions and you will be up and running a full bpmPaaS based on JBoss BPM Suite in a matter of minutes.

The projects now available for you in bpmPaaS with more to follow in the same project repository:
There are demo videos when available linked directly from the projects listed above. No excuse now for you not to give the JBoss BPM Suite a try in the Cloud.

Enjoy!

Friday, October 24, 2014

3 Simple Guidelines to Rule Development, Design and Traceability

(Article guest authored together with John Hurlocker, Senior Middleware Consultant at Red Hat in North America)

In this tips and tricks article we present some background and guidelines for the design cycle encountered when one is working with rules projects.

This article is not the only standard or all encompassing source of how each and every rules and events project will evolve over time.

What it is going to do is provide you with the basics as we have encountered them in many projects in real life organizations. They are meant to give you some confidence as you embark on your very own rules and events adventure within the world of JBoss BRMS.

We will discuss some of the requirements phase around rules development, touch on a few of the design choices that will be encountered and elaborate on the options available for including requirements traceability within the projects.

1. Requirements

A rule author will analyze project requirements to determine the number of rules that will need to be created and also works with the requirements team so they can provide answers to any questions that might arise.

Analyzing rules requirements is the phase where a look at the following questions takes place:
  • Are there any WHEN or THEN conditions that are unclear when reviewing the requirements?
  • Are some of these rules data validations?
  • Can multiple requirements be combined into one rule?
By spending some pre-development time examining and validating the project requirements you will be able to narrow the scope of the work to be done in your development cycles.

These questions have been dealt with in previous articles in the tips and tricks.

2. Design

In the design phases an enterprise rule administrator will need to work with the organization and ask some of the following questions:
  •  Will the organization need to host a central rules repository or would that not be beneficial?
  •  Who owns these rules and is responsible for updating and releasing new versions?
  • Are there common rules that can be reused between groups?  
Centralized JBoss BRMS repository.

A central repository is one JBoss BRMS server available for the entire organization to author, store, and build rules.

It promotes rule reuse, is easier to manage and maintain instead of deploying multiple repositories in an organization.

If a set of rules is going to be shared with other groups then one of the groups will need to take ownership and will be responsible for updating and releasing new versions.

The rule author will need to work with the application team(s) to determine what rule format or formats will be used and which tool will be used to author rules. Some of the questions to be dealt with are:
  •  Should rules be developed in the BRMS Dashboard or through JBoss Developer Studio (JBDS)?
  • What are your rule authors more comfortable with?
  • Who will maintain the rules in the future?
    • Java developers, business analysts
  • Do the requirements work better in one format vs. another?
    •  e.g.  web based data table, business guided rule, DSL
  • What type of testing is required?
  •  JUnit and BRMS test scenarios?
These topics have been laid out in previous articles, please refer to them for a deeper discussion.

Options in meta data for requirements traceability.

3. Traceability

Once the rules and events are being implemented it is vital to have some sort of requirements traceability attached to the rules that links them to the originating requirements.

With JBoss BRMS rule authors can set meta data on the rules for traceability to requirement(s), for instance:
  • Associated requirements can be set on rules in the description section.
  • Associated requirements can also be set as an external link on the rule meta data.
  •  Reports can be generated by pulling meta data information from the repository.
In a future article we will dig deeper into how you can use meta data fields within your rules implementation to trace your requirements and extract this information to generate documentation around these requirements.


Tuesday, October 21, 2014

Rocket into the Clouds with OpenShift bpmPaaS Quickstarts

Are you ready for BPM in the Cloud?

This is not the first time we have put the various demo projects project into the Cloud, previously we did it on an older version 6.0.1.

This time around we have updated this to setup the project for you on OpenShift using JBoss BPM Suite 6.0.2, the current version of bpmPaaS.

Let's get started and help you setup this automated cartridge installation that kick start you with pre-loaded demo projects.

First you need to have an account on OpenShift Origin, which you then can upgrade for free to the Bronze level.

Generic loan process
This gives you access to the creation of MEDIUM sized gears which you will need for the bpmPaaS instances you create.

After that you can then create a new application via the online web administration console, where at the bottom of the page you will find a text box labeled Code Anything.

Paste cartridge URI, easy peasy!
This is a field where you can paste in one of the cartridge definitions we provide in the projects listed below.

Just follow each projects readme file instructions and you will be up and running a full bpmPaaS based on JBoss BPM Suite in a matter of minutes.

The projects now available for you in bpmPaaS with more to follow in the same project repository:
There are demo videos when available linked directly from the projects listed above. No excuse now for you not to give the JBoss BPM Suite a try in the Cloud.

Enjoy!

Friday, October 17, 2014

Examining 2 Ways to Deploy Rules and Event with Red Hat JBoss BRMS (part IV)

(Article guest authored together with John Hurlocker, Senior Middleware Consultant at Red Hat in North America)

In this week’s tips & tricks we will be revisiting the series started around possible Red Hat JBoss Business Rules Management System (BRMS) deployment architectures.

In the last article we talked about the various aspects around rule authoring with a focus on how a rule administrator in charge of your business logic can effectively complete the tasks needed to ensure proper delivery.

In this article we will describe some of the options available to a rule administrator when she wants to deploy rule projects into her enterprise in support of applications making use of them.

Rule artifact deployment

There are various deployment architectures available when using JBoss BRMS. The selection of one will often determine the course needed to be taken when deploying the final rules projects into your enterprise.

To recap the following list is has been covered in detail in the previous three articles (see bottom for links):
  • Rules deployed in application
  • Rules scanned from application
  • Rules execution server
  • Hybrid of rules execution server


Based on how an application’s architecture is setup, there are several options available for deploying rule projects or artifacts to your applications. You can use the KieScanner in your application or you can include the rule artifact in your applications deployable artifact.

1. Deploy with application


Rules Packaged with you applications deployable artifact is the most static way to manage your deployments. 

Figure 1: Application deployment with rules artifact.
Each application adds a specific rules artifact version as a dependency that is included in the build of the deployable application artifact. This has been outlined in figure 1, where you see the Build Script block as a placeholder for your organizations continuous integration framework. This chain of tooling ensures the desired rules artifact builds and passes all testing. It will then obtain a copy of the applications code that builds and passes all testing. These two are combined to generate a deployable artifact which is then deployed onto the hosting application server.

For an example of this we can look at the Customer Evaluation demo project where we have an application that contains a unit test. This application depends on a specific version of the customer evaluation rules project, which is included in the project POM file.

<!-- KJar file from project. -->
<dependency>
     <groupId>customer</groupId>
     <artifactId>evaluation</artifactId>
     <version>1.0</version>
     <scope>compile</scope>
</dependency>

This ensures that our application will generate the deployable artifact that is based on version 1.0 of this rules project and no other.

Once deployed the rules can only be updated by building a new version of the rules project, updating the dependency and building the application again as described above.

What about dynamic rules updates?

2. KieScanner


If you are interested in dynamically updating rules without having to redeploy your applications and having the application then pick up the new rules, you need to setup the KieScanner.

Figure 2: KieScanner to monitor external rule artifacts.
In figure 2 the application is build with a KieScanner component configured which is started when the application artifact is deployed. It is configured to scan a repository for certain artifacts, like a specific version, only release versions or for the latest versions.

The specific version is as described above, use of LATEST refers to the latest released or snapshot version of a rule artifact, the most recently deployed rule artifact in your repository. Using RELEASE will get you the last non-snapshot release of the rules artifact in the repository.

For an example of this we refer you to the Cool Store demo project where the KieScanner is setup in our BRMSUtil class to scan for the LATEST version of the coolstore rule artifact.

public BRMSUtil() {    
     
    KieServices kServices = KieServices.Factory.get();
    ReleaseId releaseId = kServices.newReleaseId( "com.redhat", "coolstore", "LATEST" );
    kContainer = kServices.newKieContainer( releaseId );
    KieScanner kScanner = kServices.newKieScanner( kContainer );

    // Start the KieScanner polling the maven repository every 10 seconds
    kScanner.start( 10000L );

}

Now when we update our rule project, build a new version, the deployed application artifact does not need to be changed and will pick up the changes in 10 seconds. Every user of the application will then be using the newer rules.

This completes our series on examining the JBoss BRMS deployment architectures available to you for your enterprise and application development.

Go back to part I...

Go back to part II...

Go back to part III...

Monday, October 13, 2014

How To Duplicate Artifacts In JBoss BPM Suite in 3 Easy Steps

Earlier we have shown you how to access your business users project within the JBoss BPM Suite, by cloning over an SSH connection.

The following example is using the JBoss BPM HR Employee Rewards process project as the starting off point, giving us a completed process project.

Now we assume that we want to extend our existing process with a new BPMN2 concept, but we don't want to create a new process parallel from scratch. We have the desire to copy the existing artifact and start modifying from there.

Looking into the JBoss BPM Suite we can't find a way to do this in the dashboard, not even when we are managing the artifacts as an admin user.

Project Authoring duplicate of process artifact.
This is fine, as the developer setting up a project has more control options as the underlying repository is GIT which they can approach with all the normal tooling they use to develop their applications.

In the following 3 easy steps we use the command line in a console to show the GIT interaction to copy and insert a new process that gets you started working on the new modifications you want to make.

1. Clone process project

As stated, this has been covered in a previous article. Here is the short version to clone the rewards process project over SSH.

$ git clone ssh://erics@localhost:8001/rewards-demo

Cloning into 'rewards-demo'...
The authenticity of host '[localhost]:8001 ([127.0.0.1]:8001)' can't be established.
DSA key fingerprint is ef:48:43:b3:ef:c4:ac:c7:d3:2a:3f:52:63:52:8c:e8.
Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '[localhost]:8001' (DSA) to the list of known hosts.
Password authentication
Password: bpmsuite1!

remote: Counting objects: 1277, done
remote: Finding sources: 100% (1277/1277)
remote: Getting sizes: 100% (1142/1142)
remote: Compressing objects: 100% (1076486/1076486)
Receiving objects: 100% (1277/1277), 135.97 KiB | 0 bytes/s, done.
remote: Total 1277 (delta 41), reused 0 (delta 0)
Resolving deltas: 100% (706/706), done.
Checking connectivity... done.

This gives you a local copy of the rewards process project and all artifacts.

2. Copy existing artifact

Now we want to create a copy of the existing rewards process to start extending with new functionality.

$ cd rewards-demo

$ cp rewards/src/main/resources/com/redhat/jboss/hr/rewards/rewards-approval.bpmn2 \
     rewards/src/main/resources/com/redhat/jboss/hr/rewards/rewards-multi-approval.bpmn2

$ git add rewards/src/main/resources/com/redhat/jboss/hr/rewards/rewards-multi-approval.bpmn2

$ git co -m "Added new process to extend with multi-instance approval."

Administration perspective with duplicate added.
Now we have duplicated the artifact we want to extend, but it only exists locally in our project, we need to push it back to the business users.

3. Push back into project

We push the changes back into our central repository over SSH.

$ git push

Password authentication
Password: bpmsuite1!

Counting objects: 21, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (11/11), 787 bytes | 0 bytes/s, done.
Total 11 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4)
remote: Updating references: 100% (1/1)
To ssh://erics@localhost:8001/rewards-demo
   87e23d9..c772080  master -> master

Now we can see that it appears in business-central both in the Administration Perspective and the Project Authoring perspectives. This can be done in the same exact fashion using JBoss BRMS.
Pushed back into the central repository.

We hope this helps speed up your development by easily duplicating existing artifacts in your JBoss BRMS & BPM Suite projects.