Eric D. Schabell

Tuesday, March 18, 2014

Red Hat JBoss BRMS - Online Workshop Building The Cool Store (Introduction & Labs 1 - 2)

Welcome to the kickoff of the JBoss Business Rules Management System (BRMS) & Business Process Management (BPM) Suite online workshop.

In this workshop we will be introducing you to the possibilities that abound for your business when leveraging these two new and exciting products.

Each week we will push out the next installment of this workshop that will lead you through building an online retail web shopping cart application, leveraging rules, events, and a rule-flow.

This project is available as a completed project called the Cool Store Demo, but we thought it would be interesting to help you build this application from scratch.

The second half of the workshop will be taking you through the same type of exercise, but with the JBoss BPM Suite, where you will put together an application that leverages a process, integrates rules, leverages human tasks, allows you to design your own forms, and much more.
Building the Cool Store!

This week we kick it off with an introduction to the products, then get you started by installing the JBoss BRMS product (not provided, but available online), and creating your first project.

The weeks following will feed you a new set of exercises to help you to the next stage of development as you watch your very own Cool Store rise from the ground up.

All of the workshop materials will be hosted online with the help of OpenShift, so all you need is a browser to follow along.

You do not need to be a Java developer, as this workshop focuses on only the online product web dashboard experience as an analyst would interact with the product. The only technical deviation from this will be the initial installation of the product, but we have detailed instructions and it is a three step process that should not take you more than a few minutes.

So what are you waiting for?

Let's get started with the introduction:



Then we will guide you through the installation of JBoss BRMS:



At which time you are ready for the last lab of this week, creating your new project:



Be sure to keep an eye out for next weeks release of the following article which will bring you a step closer to completing your very own Cool Store.

Series Table of Contents:
  1. The introduction and installation of JBoss BRMS 
  2. Creating a new project
  3. Creating a domain model
  4. Creating a Domain Specific Language (DSL)
  5. Creating Guided Rules
  6. Creating Technical Rules (DRL)
  7. Creating Guided Decision Tables
  8. Create RuleFlow Process
  9. Create Test Scenarios
  10. Running the Cool Store
  11. Installing JBoss BPM Suite
  12. Creating Rewards Project
  13. Create Domain Model
  14. Create Rewards Process
  15. Complete Process Details
  16. Creating User Task Forms
  17. Running Rewards Demo
  18. Automated Task Reassignment
Note: if for some reason the online materials are not available, feel free to contact me.


Monday, March 17, 2014

Red Hat JBoss BPM Suite - support matrix Control Workflow Patterns


In another installment of the JBoss BPM Suite Tips & Tricks series we will be helping you to understand the Control Workflow Patterns support that JBoss BPM Suite provides.

This article will outline the the basic control flow patterns as defined by vdAtHKB03. We will then analyze what patterns have limited support due to restrictions imposed by the BPMN2 process specification as detailed in BPM-06-22.

We will cover the complete set of 20 control flow patterns, starting with the five basic control flow patterns and finishing with the fifteen advanced branching and synchronization patterns.

Patterns

In the original research paper the authors cover five (5) basic control flow patterns:
  1. Sequence - an activity in a workfow process is enabled after the completion of a preceding activity in the same process.
  2. Parallel Split - point in the workflow process where a single thread of control splits into multiple threads of control which can be executed in parallel, thus allowing activities to be executed simultaneously or in any order.
  3. Synchronization - point in the workfow process where multiple parallel subprocesses/activities converge into one single thread of control, thus synchronizing multiple threads.
  4. Exclusive Choice - point in the workflow process where, based on a decision or workflow control data, one of several branches is chosen.
  5. Simple Merge - point in the workflow where two or more alternative branches come together without synchronization. It is an assumption of this pattern that none of the alternative branches are ever executed in parallel.
After these five patterns the authors continue on to cover fifteen (15) advanced branching and synchronization patterns:
  1. Mulit-choice - point in the workflow process where, based on a decision or workflow control data, a number of branches are chosen.
  2. Synchronizing Merge - point in the workflow process where multiple paths converge into one single thread. If more than one path is taken, synchronization of the active threads needs to take place. If only one path is taken, the alternative branches should reconverge without synchronization. It is an assumption of this pattern that a branch that has already been activated, cannot be activated again while the merge is still waiting for other branches to complete.
  3. Multi-merge - point in a workflow process where two or more branches reconverge without synchronization. If more than one branch gets activated, possibly concurrently, the activity following the merge is started for every activation of every incoming branch.
  4. Discriminator - discriminator is a point in a workflow process that waits for one of the incoming branches to complete before activating the subsequent activity. From that moment on it waits for all remaining branches to complete and "ignores" them. Once all incoming branches have been triggered, it resets itself so that it can be triggered again (which is important otherwise it could not really be used in the context of a loop).
  5. Arbitrary Cycles - point in a workflow process where one or more activities can be done repeatedly.
  6. Implicit Termination - given subprocess should be terminated when there is nothing else to be done. In other words, there are no active activities in the workflow and no other activity can be made active (and at the same time the workflow is not in deadlock).
  7. Multiple Instances Without Synchronization - Within the context of a single case (i.e., workflow instance) multiple instances of an activity can be created, i.e., there is a facility to spawn o new threads of control. Each of these threads of control is independent of other threads. Moreover, there is no need to synchronize these threads.
  8. Multiple Instances With a Priori Design Time Knowledge - For one process instance an activity is enabled multiple times. The number of instances of a given activity for a given process instance is known at design time. Once all instances are completed some other activity needs to be started.
  9. Multiple Instances With a Priori Runtime Knowledge - For one case an activity is enabled multiple times. The number of instances of a given activity for a given case varies and may depend on characteristics of the case or availability of resources, but is known at some stage during runtime, before the instances of that activity have to be created. Once all instances are completed some other activity needs to be started.
  10. Multiple Instances Without a Priori Runtime Knowledge - For one case an activity is enabled multiple times. The number of instances of a given activity for a given case is not known during design time, nor is it known at any stage during runtime, before the instances of that activity have to be created. Once all instances are completed some other activity needs to be started. The difference with Pattern 9 is that even while some of the instances are being executed or already completed, new ones can be created.
  11. Deferred Choice - point in the workflow process where one of several branches is chosen. In contrast to the XOR-split, the choice is not made explicitly (e.g. based on data or a decision) but several alternatives are offered to the environment. However, in contrast to the AND-split, only one of the alternatives is executed. This means that once the environment activates one of the branches the other alternative branches are withdrawn. It is important to note that the choice is delayed until the processing in one of the alternative branches is actually started, i.e. the moment of choice is as late as possible.
  12. Interleaved Parallel Routing - set of activities is executed in an arbitrary order: Each activity in the set is executed, the order is decided at run-time, and no two activities are executed at the same moment (i.e. no two activities are active for the same workflow instance at the same time).
  13. Milestone - enabling of an activity depends on the case being in a speci ed state, i.e. the activity is only enabled if a certain milestone has been reached which did not expire yet. Consider three activities named A, B, and C. Activity A is only enabled if activity B has been executed and C has not been executed yet, i.e. A is not enabled before the execution of B and A is not enabled after the execution of C.
  14. Cancel Activity - An enabled activity is disabled, i.e. a thread waiting for the execution of an activity is removed.
  15. Cancel Case - A case, i.e. workflow instance, is removed completely (i.e., even if parts of the process are instantiated multiple times, all descendants are removed).
Now we can focus on JBoss BPM Suite and evaluate what it is capable of supporting and to what degree.

JBoss BPM Suite

Looking at the product for coverage of these basic control flow patterns, we can put together the following matrix. If JBoss BPM Suite directly supports the pattern through one of its constructs, it is rated +. If the pattern is not directly supported, it is rated +/-. Any solution which results in spaghetti diagrams or coding, is considered as giving no direct support and is rated -.

PATTERN JBoss BPM Suite
Sequence +
Parallel Split +
Synchronization +
Exclusive Choice +
Simple Merge +

The JBoss BPM Suite product overview matrix showing the potential support for the advanced branching and synchronization patterns is as follows.

PATTERN JBoss BPM Suite
Multi-choice +
Synchronizing Merge +
Multi-merge + / -*
Discriminator + / -*
Arbitrary Cycles +
Implicit Termination +
Multiple Instances Without Synchronization +
Multiple Instances With a Priori DT Knowledge +
Multiple Instances With a Priori RT Knowledge +
Multiple Instances Without a Priori RT Knowledge -**
Deferred Choice +
Interleaved Parallel Routing + / -*
Milestone -**
Cancel Activity +
Cancel Case +
* limited by BPMN specification.
** not supported by BPMN specification.

As you might have noticed, JBoss BPM Suite is able to support almost all of the control workflow patterns as outlined by vdAtHKB03. Where there is limited support for a pattern is only due to the adherence to the BPMN standard as explained in  BPM-06-22. 

We hope this overview outlines the potential JBoss BPM Suite has for supporting control workflow patterns.

In a follow up articles we will provide examples projects to support these claims, so stay tuned.


Friday, March 14, 2014

Red Hat JBoss BPM Suite - preview bpmPaaS Test Driving Cloudy Process Designer

Cloud Enabled BPMN2 Process Designer

With the release of the Red Hat JBoss BPM Suite we have something kinda fun for you setup to preview some of the components found in the product itself.

Together with the project team, Maciej and Tihomir that work on this fantastic component, we have set up a repeatable standalone demo installation of the BPMN2 process designer.

It is fully functional and you can design you processes in the Cloud setup based on OpenShift Origin.

The setup instructions can be found on github.com:


Cloudy designer login
It is very easy to get this project setup, just follow the instruction and in minutes you will be designing your business process in the Cloud!

Running on OpenShift

Create an account at http://openshift.redhat.com/
Create a JBoss EAP application
rhc app create -t jbossas-7 --from-code git://github.com/eschabell/openshift-bpm-process-designer.git designer
That's it, you can now checkout your application at:
http://designer-$your_domain.rhcloud.com     
Just follow the link provided to the designer login:
http://designer-$your_domain.rhcloud.com/designer

Login credentials

       user: erics

   password: erics

Cloudy JBoss BPM Process Designer
Test drive this install right now on http://designer-inthe.rhcloud.com.

Tuesday, March 11, 2014

Red Hat JBoss BRMS 6 - the new Cool Store Demo

Cool Store web shop

It is time for another update to the awesome JBoss Business Rules Management System (BRMS) Cool Store Demo, this time brought to you in the brand new JBoss BRMS 6 product.

This last week Jason Milliron and myself spent some time freshening up this retail web shopping example to the all new product version. We now have the Cool Store web application that relies on the JBoss BRMS business central based project for its rules, events, model, and a rule-flow.

Some time ago Jason put together an example web application based on the popular framework Vaadin which is an example of an online shopping cart. This web application demonstrates interaction between a web front end and a decision table and rules package. This allows the business logic to become externalized from your deployed application and can then be modified as needed at runtime. This application leverages the rules to calculate the shipping costs based on your rules in the table below.

It is pretty simple really, you can adjust how much the ranges are and what the shipping for the shopping cart total order will be by tweaking this table, for example:

JBoss BRMS Cool Store decision table
  • the price from Tier 2 based on value totaling between $26 - $50 is $4.99
  • you can fill your cart with over $25 of materials to validate
  • edit decision table and adjust it to $6.99 
  • save changes
  • build & deploy your cool store project
  • clear the shopping cart application
  • re-order the same materials and validate the charge to shipping is now $6.99

I have released version 2.0 based on JBoss BRMS 6.0.0.GA which will get you started in a very short amount of time. See the provided documentation and Readme file in the project.

The project is in the same template you are used to getting from JBoss Technology Evangelists, providing you with the 3-step setup you expect from us:

  1. clone the project.
  2. download the products (JBoss EAP + BRMS)
  3. run the init script for automated setup.

We can't make it any easier, so hope you enjoy!


Monday, March 10, 2014

Red Hat JBoss BPM Suite - Lab Workshop for Business Activity Monitoring (BAM)

Running in the Cloud or Standalone

We are pretty excited about the release of a new JBoss BPM Suite product at Red Hat, so we have something kinda fun for you setup to preview one of the new components in this product.

This is a Business Activity Monitoring (BAM) component that allows you to connect to various data sources within your organization and generate graphical reports based on this information.

Previously we wrote about how to run this component in the Cloud. Now we want to provide you with not only a standalone local installation, but also a small introductory lab-based workshop to keep you busy.

It is time to get hands-on with this component!

For this demo you will find SQL datasources and CSV flat files as data sources. There are many more options coming so watch for the data sources you want to connect too in future announcements.

By default the Dashbuilder project contains predefined data sources to two different CSV files located within the demo code base. It also contains three preconfigured SQL datasources for queries to jBPM tables to allow you to plug it directly into a JBoss BPM Suite installation.

For now I just want to share a tour of the functionality that was showcased last year in a preview at the Red Hat Summit booth where we also highlighted the JBoss BPM Suite web process designer. There was a lot of interest in this demonstration and the video drew participants into the booth like a fly to honey!
The project can be found on github to get you started at https://github.com/eschabell/bpms-bam-dashboard and the lab documentation can be found within this project under the directory docs/BAM lab guide.pdf.


Quickstart guide

See Quick Start Guide in project as ODT and PDF for details on installation. For those that can't wait:
  • see README in 'installs' directory
  • add products
  • run 'init.sh' & read output
  • start JBoss EAP server
  • login to dashbuilder (http://localhost:8080/dashbuilder) with user 'erics' and password 'bpmsuite'
After that you can get into the details with the aforementioned lab guide. A video preview of the component is provided here:

This video is also available on YouTube.


Friday, March 7, 2014

Released jBPM Migration Tooling v0.13

Got your ducks in a row?

With the new version of JBoss BPM Suite in the works, it is time again to release the work being done on the jbpmmigration project.

We went to work and are happy to announce the availability of the jBPM Migration projects, jbpmmigration v0.13.

We have fixed a few issues, added release to JBoss Nexus, and have added new tests bringing the total up to 42 process conversion examples.

The OpenShift jBPM Migration WebApp has been updated to run with the current release, you can find it here and test your processes against the migration tooling.

         http://jbpmmigration-inthe.rhcloud.com.

Future planning is to work on including this update into the jBPM Designer as soon as we can.

We hope you enjoy converting your jPDL 3.2 into BPMN2 with this release.


Thursday, March 6, 2014

Red Hat JBoss BPM Suite - preview bpmPaaS Cloudy Business Activity Monitoring (BAM)

Cloudy BAM

With the release of the Red Hat JBoss BPM Suite we have something kinda fun for you setup to preview some of the components found in the product itself.

I have put together a preview of the JBoss BPM BAM Dashboard Builder component and pushed it into the Cloud.

That is all nice and such, but for you to enjoy this you want to have it repeatable for your own quick and easy usage. No worries, I have that for you too. Here are a few screenshots and you can follow the steps below to install your very own version in the OpenShift Cloud.
Logged into the BAM dashboard

You can find the project I setup to install this in your very own instance of OpenShift here:

https://github.com/eschabell/openshift-bpm-bam-dashboard/tree/v1.0

Running on OpenShift

Create an account at http://openshift.redhat.com/
Create a JBoss AS instance
rhc app create -t jbossas-7 --from-code git://github.com/eschabell/openshift-bpm-bam-dashboard.git bampreview
There is one step to add the user login files that are not being correctly copied to the JBoss server. Using the rhc scp command, copy the following files, then the login will work below.
 rhc scp bampreview bampreview/.openshift/config/bam-*.properties jbossas/standalone/configuration/
That's it, you can now checkout your application at:
http://bampreview-$your_domain.rhcloud.com     
Just follow the link provided to the designer login:
Your KPI's report
http://bampreview-$your_domain.rhcloud.com/dashbuilder

Login credentials

       user: erics

   password: erics

For a video tour you can refer to:


Test drive this install right now on http://bam-inthe.rhcloud.com.


Tuesday, March 4, 2014

Red Hat JBoss BPM Suite - Run the Mortgage Demo (video)

JBoss BPM Suite Mortgage Demo

A while back I walked you through how to setup the all new JBoss BPM Suite Mortgage Demo, based on the provided example BPM project that you can download with the product. I just wrapped it up and made it a 3-click installation experience.

You will be up and running in less than 5 mins, at least that was all it took for me to video the experience for you.

Now we continue onwards, and show you exactly what is in this process project, how it works, take a single run through the process, and examine the results in the provided BPM BAM dashboard. This video is a bit longer than we like to present at just over 13 minutes covering all of the following aspects and components along the way:

Components on display

  • Administration dashboard
    • manage organizational units
  • Artifact repository dashboard
    • upload data model
  • Project authoring dashboard
    • process designer
    • rule editors
    • form modeler
    • data modeler
      • project editor
        • build and deploy project
    • Process Definitions dashboard
      • view definitions
      • start process instance
    • Process Instance dashboard
      • Tasks dashboard
      • Process & Task dashboard
      As you can see this is a pretty complete run through all the things you will need to understand the project and run the demo. We plan to provide smaller demo videos in the future that will zoom in on short tutorials of individual JBoss BPM Suite components.