Eric D. Schabell

Friday, October 10, 2014

Examining Red Hat JBoss BRMS design time architecture for rules and events (part III)

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

This is the third part in the series started around possible Red Hat JBoss Business Rules Management System (BRMS) deployment architectures.

Previously we covered in two parts the various deployment architectures you have to deploy a rules and/or events project in your enterprise.

In this article we move forward to 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.

Rule administration

A rule administrator will be involved with configuration of JBoss BRMS dashboard tooling before rules are authored.

Administration of building rules.
Some of the issues where she might be involved are related to initial product setup, but what is more in her area of expertise is where we will focus. She will be part of the process around selecting authoring tools and determining the rule formats to be used on projects.

After the projects have started and rule authors are working with the tooling selected and combining their efforts with the application development teams, the rule administrator will have the task of validating the business logic to be used.

Test scenarios.

Building

Once the business logic has been captured in a rules project, the rule administrator is responsible for building the rule package that will be distributed to applications.

This process starts with the rule administrator running all tests that are included in the business logic or rules project, both the tests included in the rule authoring suite and the eventual developer tests.

Assuming the enterprise in question has proper continuous integration tooling setup we will leave that testing story to others and focus on the ability to test the rule packages with the tooling provided to a rule administrator within JBoss BRMS dashboard.
Report shows failure.
  • Test scenarios
    • Rule authors can create test scenarios to validate rules and knowledge bases through JBoss BRMS in the workbench. These test scenarios are independent of your applications implementation.
  • JUnit testing
    • Just a short comment to note that to properly test any rules with application code it should be exercised with some form of unit testing tools. 
    • Rules deployed after passing testing.
    • Just because there are test scenarios setup in JBoss BRMS workbench that pass successfully does not mean that there might not be issues with their usage within an applications implementation.
  • Notify rule developer(s) if there are errors.
  • If there are no errors the rule administrator can build the appropriate rule package(s). In JBoss BRMS this will produce a Maven artifact, which is a normal JAR file.
Looking to Automate your business?

Next up

In the next article in this series we will discuss the tasks a rule administrator deals with to deploy the rule packages into her enterprise to support the applications making use of them.




Wednesday, October 8, 2014

4 Foolproof Tips Get You Started With JBoss BRMS 6.0.3

Last week Red Hat released the next version of JBoss BRMS, labeled 6.0.3 and it is available in their Customer Portal for those with a subscription.

If you are curious as to what is new in this release, see the release notes and the rest of the documentation online in the Customer Portal.

What we are looking for are some easy ways to get started with this new release and this article has just the things you are looking for.

We will give you a foolproof installation to get you started, then show you a complete online web shop project you can experiment with, provide a completed Cool Store project for your evaluation needs and finally provide you with an advanced integration example that ties together JBoss BRMS with  JBoss Data Virtualization.
Installation to get started.

Tip #1

This is the first step in your journey, getting up and running without a lot of hassle or wasted time.

This starts with the JBoss BRMS Install Demo which gets you started with a clean installation, a user to get started, and the product open in your browser for you to get started designing your rules, events and rule flows.

Tip #2

Now you have an installation, you are looking at the product, but what should you do next?

No worries, we have a very nice hands on tutorial for you that shows you how to take your installation from zero to a full blown online web shopping cart application. You will build the rules, event and rule flow that is needed to realize this application.

Check this online workshop here:



Tip #3

Maybe you are just looking to evaluate or just play with the product we also have a fully finished Cool Store retail example for you to enjoy.

Online web shopping cart.
This is the fully completed online web shopping cart application with rules, decision table, event and rule flow that you can also put together yourself (see Tip #2).

This project also has links to more information and details around what it is made of and also provides a video walk through.

Give it a go and install the Cool Store Demo project to evaluate JBoss BRMS today.

Tip #4

The final step is to examine more advanced use cases like integration cases using JBoss Data Virtualization.

Integration solution.
It just so happens we have an interesting project, JBoss BRMS & JBoss DV Integration Demo, that is just as easy to install as the previous ones and it demonstrates the value of decision logic being used with diverse data sources in an enterprise.

Also be sure to enjoy the extensive video collection that is presented in the projects documentation, they walk you through all the details.

We hope these foolproof tips are all you need to get started with JBoss BRMS and the new 6.0.3 release.

Monday, October 6, 2014

5 Handy Tips From JBoss BPM Suite For Release 6.0.3

Last week Red Hat released the next version of JBoss BPM Suite, labeled 6.0.3 and it is available in their Customer Portal for those with a subscription.

If you are curious as to what is new in this release, see the release notes and the rest of the documentation online in the Customer Portal.

What we are looking for are some easy ways to get started with this new release and this article has just the things you are looking for.

We will give you a foolproof installation to get you started, then show you a complete HR employee rewards project you can experiment with, provide a completed HR employee rewards project for your evaluation needs, give you a list of more demo projects you might like to explore and finally provide you with an advanced integration example that ties together JBoss BPM Suite with JBoss Fuse.

Easy initial setup.

Tip #1

This is the first step in your journey, getting up and running without a lot of hassle or wasted time.

This starts with the JBoss BPM Suite Install Demo which gets you started with a clean installation, a user to get started, and the product open in your browser for you to get started designing your rules, events and BPM projects.

Tip #2

Now you have an installation, you are looking at the product, but what should you do next?

No worries, we have a very nice hands on tutorial for you that shows you how to take your installation from zero to a full blown online HR Employee Rewards process project. You will work with the domain modeler, the form modeler and the process designer to realize this application.

Check this online workshop here:



Tip #3

Maybe you are just looking to evaluate or just play with the product we also have a fully finished HR employee rewards example for you to enjoy.

BPM process designer.
This is the fully completed HR application with a domain model, human task forms and BPM process that you can also put together yourself (see Tip #2).

This project also has links to more information and details around what it is made of and also provides a video walk through.

Give it a go and install the HR Employee Rewards Demo project to evaluate JBoss BPM Suite today.

Tip #4

There are many more demo projects you can look at to dig deeper into various aspects of the product, here is a list for your explorations:
JBoss FSW integration demo.

These should keep you busy and let you dig into the various aspects of this product.


Tip #5

The final step is to examine more advanced use cases like integration cases using JBoss Fuse.

JBoss Fuse integration with BPM.
It just so happens we have an interesting project, JBoss BPM Suite & JBoss Fuse Integration Demo, that is just as easy to install as the previous ones and it demonstrates the integration of a Camel route with a BPM process.

Also be sure to watch the video in the project documentation that walks you through all the details.

We hope these handy tips are all you need to get started with JBoss BPM Suite's new 6.0.3 release.

Wednesday, October 1, 2014

2 Surprising JBoss BPM Discoveries at Munich Oktoberfest

JBoss BPM is where?
While at the local Munich Red Hat office last week I was pleasantly surprised that there was this local cultural event called Oktoberfest.

Ever heard of it?

Kind of nice actually. They all gather in these huge tents to sing, drink and be merry while they are wearing local costumes.

Who am I to judge?

There were a few things that caught my attention and are worth sharing in regards to the use of JBoss BPM in Munich and I wanted to share them with you all.

What could possible have anything to do with JBoss or BPM you might ask yourself, but even when there were thousands of festival goers you could not help but notice it. JBoss BPM will even drag people away from the large tents, the lovely food and unmistakable huge German beers.

1. JBoss BPM Evangelist Brainstorming

JBoss all day long!
The first event that was pulling people away, though to be honest it was just a few of us, was a brainstorm session we held at the offices.

A nice guy and colleague, Markus Eisele spent some time outside of the party tents to talk JBoss, BPM, rules, integration and what we might be able to come up with together around these topics the coming months.

He will become more and more active in the coming months on integration topics around the European region, so watch for this and enjoy it as we integrate not only projects but include some structure with rules and BPM.

2. JBoss BPM workshop 

The second surprise was that you can get a group of people away from Oktoberfest by promising them a hands on day with JBoss BRMS and JBoss BPM Suite!

We spent the day working through the online workshop developing rules, events and BPM projects. It was attended by a group of partners local to Munich and they put in the full day, even with the festivities calling out to them.



During the workshop several were also interested in and made use of the OpenShift bpmPaaS offerings by creating their projects directly in the Cloud.

Fun had by all and there was even enough time for everyone to head off to catch the last bit of music at the tents before heading home.

Maybe it is time to make it an annual event, where JBoss BPM technologies are used to draw the crowds out of the tents and into more intellectual activities?


Monday, September 29, 2014

4 Exciting Resources From BPM Openhouse 2014

This week was the kickoff of the BPM Open House event online.

While I posted earlier that there were a number of reasons to attend, the biggest was to enjoy the overview and live demo given of JBoss BPM Suite on both local and bpmPaaS on OpenShift.

Before we give you the promised resources, a short recap of the event and our sessions.

We delivered our session live before a worldwide audience and opened with the following by Luis Cortes.

Improve your organization’s capability for faster growth and change with BPM, Rules and Events

BPM is no longer only about improving efficiency and productivity. According to leading analysts, 85% of organizations report that their primary objective for BPM is achieving faster growth and improved capabilities for change. Meanwhile, where once traditional BPM systems were too expensive and too complex for mid-sized businesses to setup and use now because of cloud computing BPM is becoming more accessible to a much larger audience.

So how can Business Process Management help your business quickly adapt to changing business requirements?

Join this session to:

  • Hear how a leading consumer goods manufacturer uses Red Hat BPM to manage the process of launching new products increasing sales of new product by 18% and decreasing the time to market from 15 to 9 weeks
  • Understand how you can use Business Process Management, Rules and Events to support business growth and fuel your company’s performance
  • Explore general trends on why companies from all sectors are embracing and getting results from BPM



There was then a live demo session where I walked through the various aspects of a financial project showcasing rules, events and BPM. Finally I showcased the same project in bpmPaaS, a cloud deployed JBoss BPM Suite. It was all based on the following outline.

Red Hat JBoss BPM Suite - Building flexible business solutions for changing markets

Looking for improved business agility, operational efficiency and time to market? This demonstration, focusing on a loan origination scenario, will take you through how you can quickly model, simulate, test, deploy and improve a working example using JBoss BPM Suite’s web-based tools. JBoss BPM Suite is an open source business process and decision management platform that enables users to capture business policies and procedures, accelerate application development and automate business operations across physical, virtual, mobile and cloud environments.


This demonstration will explore the following features:
  • Graphical process modeler
  • Guided rule editors
  • Process simulator
  • Forms Designer
  • Interactive business dashboard




We promised four resources that were not to be missed at the BPM Openhouse.

  1. Free access to session slides
  2. Unlimited access to Mortgage BPM project
  3. Open use of free Cloud instances of JBoss BPM Suite on OpenShift
  4. Bonus usage of free Cloud instances of JBoss BRMS on OpenShift

Enjoy!

Friday, September 26, 2014

2 Sessions To Challenge You at JavaLand 2015

There is a new and interesting Java based conference that is gaining in popularity rather quickly.

It is called JavaLand and in 2015 it will be hosted on March 24-25th in Phantasialand, a theme park with great facilities located in Germany.

I am interested in bringing to you a full immersion experience with hands on workshops for xPaaS, rules, events and BPM. We will build all things cloudy and BPM enabled if these submissions are accepted.

Java island?
You have to admit, the location is pretty special so hope to join everyone with the following lab based workshops.

Mastering xPaaS - get down and dirty in the OpenShift Cloud

Ever wondered about all the new Cloud offerings out there? What is a PaaS? What is this thing Garner keeps calling xPaaS? How can I as a beginner get started in a few hours?

Whether your business is running on applications based on Java EE6, PHP or Ruby, the cloud is turning out to be the perfect environment for developing your business. There are plenty of clouds and platform-as-a-services to choose from, but where to start?

Join us for three action-packed hours of power where we'll show you how to deploy your existing application written in the language of your choice - Java, Ruby, PHP, Perl or Python, with the project of your choice - jBPM, Ceylon, Switchyard, Drools Planner, Aerogear, GateIn, Drools (Rules / BPM) and more deployed into the OpenShift PaaS in just minutes. All this and without having to rewrite your app to get it to work the way the cloud provider thinks your app should work.


If you want to learn about xPaaS and see how investing just a few hours of your time can change everything you thought you knew about putting your business applications in the cloud, this session is for you!


Do It Yourself Adventure - Add Rules & BPM To Your Toolbox

Ready to add something new to your development toolbox?

With this workshop you get a chance to do just that, unlock the power of business rules engines and business processing for your development projects. We will take you through it all step-by-step, building rules, domain specific languages, events and BPM to create a real life project of your choosing. Choose from an online web shopping cart experience or an HR employee awards approval process, it's all up to you.

This is a hands on session that takes you from zero to a fully working project based on JBoss open source software. An extra bonus will be an option to run your project on a real life PaaS experience as provided by OpenShift. No time like the present to accelerate your projects into the Cloud!

No expertise in rules or processes is required, you will be guided by the speaker and be sent homeward ready to apply what you have learned in your own projects.


Look forward to seeing you all next year!

Tuesday, September 23, 2014

How to solve impossible business resource planning problems

A fantastic webinar is being hosted this week on JBoss Business Resource Optimizer, a tool used to ease the planning of your business resources.

The tour will be given by none other than Geoffrey De Smet, senior software engineer and OptaPlanner community project lead at Red Hat together with Phil Simpson, principal product marketing manager at Red Hat.

Geoffrey has vast experience at modeling, solving, creating and executing optimization tooling for these complex problems. You don't want to miss a chance to hear him expound on the various aspects and challenges that they are able to meet for your business.

Be sure to register before the event, to be held on Wednesday, 24 Sep 2014 at 11:00 ET (11AM ET) / 17:00 CET (Paris).

Webinar abstract

The world is full of planning problems—scheduling employee shifts, assigning delivery cars to routes, scheduling classrooms for course exams, and assigning manufacturing tasks to machines—just to name a few. Each of these problems can have dozens, or even hundreds, of interconnected constraints.

Solving such problems optimally is key to your business success. The technology and knowledge to do so has been available almost exclusively to large enterprises. Until now.

Powerful—yet accessible and easy to use—tools are now available to help any size enterprise optimize business resource planning.

Join us for this webinar to learn:

  • Basic planning concepts.
  • When to choose heuristic or metaheuristic optimization algorithms.
  • How to overcome scalability challenges.
  • How to quickly solve a wide range of common planning problems using the OptaPlanner planning engine and advanced rules engine functionality in Red Hat JBoss BRMS.

Saturday, September 20, 2014

3 Essential Ways To Start Your JBoss BPM Process

This episode of tips and tricks will help you to understand the best way to initiate your process instances for your needs.

Planning your projects might include process projects, but have you thought about the various ways that you can initiate your process?

Maybe you have JBoss BPM Suite running locally in your architecture, maybe you have it running in the Cloud, but wherever it is you will still need to make an informed choice about how to initiate a process.

We will cover here three essential ways you can best start a JBoss BPM process:
  1. UI dashboard
  2. RestAPI
  3. Build & Deploy button top right.
  4. client application (API)

BPM Suite UI

In the interest of completeness we have to mention the ability to start a process instance exists in the form of a button within JBoss BPM Suite dashboard tooling.

When logged into JBoss BPM Suite and you have finished project development, your BPM project can then be built and deployed as follows.

AUTHORING -> PROJECT AUTHORING -> TOOLS -> PROJECT EDITOR -> BUILD&DEPLOY (button)

The next step is to start a process instance in the process management perspective in one of two ways.

1. PROCESS MANAGEMENT -> PROCESS DEFINITIONS -> start-icon

 2. PROCESS MANAGEMENT -> PROCESS DEFINITIONS -> magnifying-glass-icon -> in DETAILS panel -> NEW INSTANCE (button)

Process definitions has start icon in right corner.
Both of these methods will result in a process instance being started, popping up a start form if data is to be submitted to the BPM process.


RestAPI

Assuming you are going to be calling for a start of your BPM process after deployment from various possible locations we wanted to show you how these might be easily integrated.

Details view of process definition has 'New Instance' button.
It does not matter if you are starting a process from a web application, a mobile application or creating backend services for your enterprise to use as a starting point for processes. The exposed RestAPI provides the perfect way to trigger your BPM process and can be show in the following code example.

This example is a very simple Rest client that, for clarity, will be embedding the various variables one might pass to such a client directly into the example code. There are no variables passed to the process being started, for that we will provide a more complete example in the section covering a client application.

It sends a start process command and expects no feedback from the Customer Evaluation BPM process being called, as it is a Straight Through Process (STP).

public class RestClientSimple {
    private static final String BASE_URL = "http://localhost:8080/business-central/rest/";
    private static final String AUTH_URL = "http://localhost:8080/business-central/org.kie.workbench.KIEWebapp/j_security_check";
    private static final String DEPLOYMENT_ID = "customer:evaluation:1.0";
    private static final String PROCESS_DEF_ID = "customer.evaluation";
    
    private static String username = "erics";
    private static String password = "bpmsuite";
    private static AuthenticationType type = AuthenticationType.FORM_BASED;

    public static void main(String[] args) throws Exception {

     System.out.println("Starting process instance: " + DEPLOYMENT_ID);
        System.out.println();
        
     // start a process instance with no variables.
        startProcess();

        System.out.println();
     System.out.println("Completed process instance: " + DEPLOYMENT_ID);
    }

    /**
     * Start a process using the rest api start call, no map variables passed.
     * 
     * @throws Exception
     */
   public static void startProcess() throws Exception {
        String newInstanceUrl = BASE_URL + "runtime/" + DEPLOYMENT_ID + "/process/" + PROCESS_DEF_ID + "/start";
        String dataFromService = getDataFromService(newInstanceUrl, "POST");
        System.out.println("newInstanceUrl:["+newInstanceUrl+"]");
        System.out.println("--------");
        System.out.println(dataFromService);
        System.out.println("--------");
    }

<...SNIPPED MORE CODE...>
}

The basics here are the setup of the business central URL to point to the start RestAPI call. In the main method one finds a method call to startProcess() which builds the RestAPI URL and captures the data reply sent from JBoss BPM Suite.

To see the details of how that is accomplished, please refer to the class in its entirety within the JBoss BPM Suite and JBoss Fuse Integration Demo project.

Intermezzo on testing

An easy way to test your process once it has been built and deployed is to use curl to push a request to the process via the RestAPI. Such a request looks like the following, first in generic form and then a real run through the same Customer Evaluation project as used in the previous example.

The generic RestAPI call and proper authentication request is done in curl as follows:

$ curl -X POST -H 'Accept: application/json' -uerics 'http://localhost:8080/business-central/rest/runtime/customer:evaluation:1.1/process/customer.evaluation/start?map_par1=var1&map_par2=var2'

For the Customer Evaluation process a full cycle of using curl to call the start process, authenticating our user and receiving a response from JBoss BPM Suite should provide the following output.

$ curl -X POST -H 'Accept: application/json' -uerics 'http://localhost:8080/business-central/rest/runtime/customer:evaluation:1.1/process/customer.evaluation/start?map_employee=erics'

Enter host password for user 'erics':  bpmsuite1!

{"status":"SUCCESS","url":"http://localhost:8080/business-central/rest/runtime/customer:evaluation:1.1/process/customer.evaluation/start?map_employee=erics","index":null,"commandName":null,"processId":"customer.evaluation","id":3,"state":2,"eventTypes":[]}

Results of our testing with curl.
We see the process instances complete in the process instance perspectives as shown.

Client application

The third and final way to start your JBoss BPM Suite process instances is more in line with injecting a bunch of pre-defined submissions to populate both the reporting history and could be based on historical data.

The example shown here is available in most demo projects we provide but is taken from the Mortgage Demo project.

This demo client is using static lines of data to be injected into the process one at a time. With a few minor adjustments one could pull in historical data from an existing data source and inject as many processes as desired in this format. It also is a nice way to stress test your process projects.

We will skip the setup of the session and process details as these have been shown above, but provide instead a link to the entire demo client class and leave these details for the reader to pursue.

Here we will just focus on how the individual start process calls will look.

public static void populateSamples(String userId, String password, String applicationContext, String deploymentId) {

   RuntimeEngine runtimeEngine = getRuntimeEngine( applicationContext, deploymentId, userId, password );
   KieSession kieSession = runtimeEngine.getKieSession();
   Map processVariables;

   //qualify with very low interest rate, great credit, non-jumbo loan
   processVariables = getProcessArgs( "Amy", "12301 Wilshire", 333224449, 100000, 500000, 100000, 30 );
   kieSession.startProcess( "com.redhat.bpms.examples.mortgage.MortgageApplication", processVariables );

}

As you can see the last line is where the individual mortgage submission is pushed to JBoss BPM Suite. If you examine the rest of the class you will find multiple entries being started one after another.

We hope you now have a good understanding of the ways you can initiate a process and choose the one that best suits your project needs.