Eric D. Schabell: 2009

Thursday, December 31, 2009

2009 in review


It is that time of year, when Christmas has passed (did you get the things you wished for?) and the New Year is upon us. A time for reflection and appreciating the things we have achieved.

As I look back I tried to come up with a picture to put in this post that would reflect the leading theme in my year. It should come as no surprise, if you have been following my blog at all, that JBoss jBPM logo is the image that has guided my year!

I started 2009 still working at the SNS Bank, leading and implementing jBPM projects to put financial products on-line for her customers. I published many of these experiences and tried to lift the lid as much as one can from inside of a financial institution, even managing to post some code to this blog. Here is a bit of a review:
All of this got the attention of Red Hat and I decided to join the team in May as a JBoss Solution Architect Benelux. It has been amazing to work inside the JBoss house, seeing the latest and greatest software rolling off the development blocks.

I was able to make some rather small contributions to some open source projects, with some translations for meebo.com, a small fix in jBPM 4.2 (can you find it?) which made the jBPM 4.3 release just before the end of 2009 and another patch is still waiting for evaluation in the jBPM 4.4 release.

On the cycling front, I picked up a new road bike, at the end of the year a winter mountain bike and made some great rides this year in several countries:
 The only sad item I have to mention was the trading in of my beloved 1987 Austin Mini, the end of an era for me with regards to Mini's.

Being healthy and happy, I wish you and yours all the best in 2010!

Wednesday, December 30, 2009

jBPM 4.3 released

The latest release posted on sourceforge includes my patch for a very small fix (but it is my first in the jBPM project!) listed here as shown in the release notes readme.html file included in the download:

Patch

  • [JBPM-2520] - The install build.xml is not reporting the new Signavio installtion target (patch attached)
 A nice way to end 2009! ;-)

Monday, December 21, 2009

Book review: jBPM Developer Guide


I have been approached about doing a review of this book, which will be appearing soon. As soon as I receive an e-copy or preview copy in the mail I will be posting my impressions in detail.

The book is available here from PACKT publishing.

Thursday, December 10, 2009

JBoss Enterprise Application Platform (EAP) deployment plans

To be honest with you, I have never heard of deployment plans before. I was aware of deployment descriptors, but not deployment plans.

A bit of searching turned up this bit of information:

Every J2EE application module must include an XML based deployment descriptor that provide configuration information for the asset as well as defining relationships to other components.

There are two types of deployments descriptors:

  • vendor neutral deployment descriptors (a.k.a deployment descriptors)
  • vendor specific deployment descriptor (a.k.a deployment plans)
Deployment descriptors are necessary but are not always sufficient to deploy an asset on your server. Deployment plans provides additional information to map declared resources names, ejb names, security roles, JMS roles (if any) to actual resources in the server. The deployment plans also contain specific server settings and configurations.

So we are looking at a vendor specific deployment descriptor file for the various application modules use. Now I was curious to those for JBoss, so dug around a bit and have come up with this overview.

Vendor neutral:
J2EE module file type Standard deployment descriptors
-------------------------------------------------------------------------------
Enterprise Application Archive (EAR) META-INF/application.xml
Web Application Archive (WAR) WEB-INF/web.xml
Jar containing Enterprise Java Beans (JAR) META-INF/ejb-jar.xml
J2EE Connector Resources Adapter Archive (RAR) META-INF/ra.xml
Enterprise Application Client Archive (JAR) META-INF/application-client.xml

JBoss specific (EAP):
J2EE module file type JBoss deployment plan
-------------------------------------------------------------------------------
Enterprise Application Archive (EAR) jboss-app.xml
Web Application Archive (WAR) jboss-web.xml
Jar containing Enterprise Java Beans (JAR) jboss.xml
J2EE Connector Resources Adapater Archive (RAR) ---
Enterprise Application Client Archive (JAR) jboss-client.xml

There you go, happy deployment planning!

Monday, December 7, 2009

A custom jBPM exception framework for jBPM 3.x

I have spent some time over the last few months (slowly, only one day a week) working on a jBPM exception handling framework. I wanted to present the use case and leave the exact details over to you as an exercise in Java coding.

The idea is that jBPM (here using 3.x supported versions from the Red Hat JBoss Customer Support Portal (CSP) provides the standard jBPM exception and that I want to also have the choice to apply a dynamically generated transition from the point of an exception that takes me to a custom exception flow. This custom exception flow is nothing more than a single decision that, based on the type of exception I have passed, will choose a path to one of the following:

  • task node (human task to evaluate the exception)
  • state node (retry using a timer to wait a bit before trying again)
  • any eventual node desired to process the exception

There are some fairly obvious benefits:

  • no longer just one handling for all your jBPM process exceptions
  • very extensible, just add new nodes into the exception handling process flow to provide new functionality
  • placing exception handling into an apart flow means you can deploy this once and use it with all of your deployed processes
  • provides for decisions, states and node exception handling. Transitions should not be doing anything exciting within my processes, if yours needs to you can extend this concept to these too.

The process flow diagram provided in this post shows the simple testing framework I used to enable this. All code snippets shown are simplified for this post. There is a global attribute that is checked for using our custom exception framework called 'useCustomExceptions'.

Decisions

For a decision node we need to implement the DecisionHandler from jBPM, so I do that in an AbstractDecisionHanlder that implements the decide() method and puts in an extra handleException() method as follows:

public String decide(ExecutionContext ctx) throws Exception {

  try {
         // pick transition from the decision handler.
         transitionName = chooseTransition(ctx); 
         getLogger().debug("Choosing transition " + transitionName);
  } catch (Exception ex) {
         if (useCustomExceptions) {
             getLogger().error("Handler threw exception.", ex);
             ctx.getNode().raiseException(ex, ctx);
         } else {
             getLogger().error("Handler threw exception.", ex);
             ctx.setException(ex);
             // use custom method to create dynamic transition.
             dynamicTransition = handleException(ctx);
         }
  }

  return transitionName;
}


// This method is provided in comment steps only, the rest
// is an exercise for you (I can not publish this code).
private String handleException(ExecutionContext ctx) {

  // Save the current node in the context to make a retry possible.
                
  // Make sure the transition to the Exception handling Node can be made.
                
  // Using handling node name for the transition name.
                
  return name_of_transition_leading_to_exception_handling;
}


Node

For a node we need to implement the ActionHandler from jBPM, so I do that in an AbstractActionHanlder that implements the execute() method. Furthermore I need to come up with a solution for the following issue that is unique to the jBPM 3.x node. When you enter a node, you have an on-node-enter event and when finished it will trigger the on-node-leave event which takes the transition that is assigned during the event on-node-enter event. This means using the Node.leave(some-transition) method will not work.

I got the reaction when I used this Node.leave(take-dynamic-transition-to-exception-handling) it worked fine until it entered the human-task wait state. At this point the originating node then continued onwards, taking the default transition (that was in the TransitionsList for the node) and merrily finishing the process flow. Even stranger, this was done on the same process id that was also assigned to some human task!

My solution is to provide a mechanism to do the following:

  • create the dynamic transition to custom exception handling for the node
  • add the dynamic transition to the TransistionsList for this node
  • put a copy of the TransistionList (without the new dynamic transition) into the jBPM Context
  • remove all transition entries from the TransistionsList except for the new dynamic one
  • use Node.leave() to follow the new dynamic transition
  • deal with exception handling
  • upon returning to the node after exception handling, pick up the transitions from the jBPM Context
  • fill the TransitionsList with those found in the jBPM Context
  • use Node.leave() to use the default

Some code to give you an idea with migrateTransitionsInNodeToContext which shows the transitions being migrated into the jBPM Context. I have left out the recovery of the transitions from the context, as it is trivial to reverse the process. To give you a bit of a hint, when you are in the exception handling process and decide it is time to go back to your originating node, you create a dynamic transition and fill the originating nodes TransitionsList from the jBPM Context. 

Here are some code snippets:

public final void execute(ExecutionContext ctx) throws Exception {

  try {
        if (ctx.getNode() instanceof State) {
           // process a state.
        } else {
   
           try {
  
              // do something in node.
           } catch (Exception ex) {
    
              if (useCustomExceptions) {
                   getLogger().error("Handler threw exception.", ex);
                   ctx.getNode().raiseException(ex, ctx);
              } else {
                   getLogger().error("Handler threw exception.", ex);
                   transitionName = handleException(ctx);

                   migrateTransitionsInNodeToContext(ctx);

                   // Move the process along.
                   if (!StringUtils.isBlank(transitionName) &&
ctx.getNode().hasLeavingTransition(transitionName)) {
                      ctx.getNode().leave(ctx, transitionName);
                   } else {
                       // Use the default transition.
                       ctx.getNode().leave(ctx);
                   }
              }
           }
        }
  } catch (Exception ex) {
      // do something
  }
}

/**
 * Use given context to migrate all transitions in the nodes list that
 * do not match the dynamic transition created for an exception.
 */
private void migrateTransitionsInNodeToContext(ExecutionContext ctx) {
  List existingTransitionsList = ctx.getNode().getLeavingTransitionsList();
  List removedExceptionTransitionList = new ArrayList();

  int i = 0;
  for (Transition transition : existingTransitionsList) {
    i++;
    if (transition.equals(transitionName)) {
      getLogger().debug("List item #" + i 
          + " is our dynamic tranition: " 
          + transition.toString());
    } else {
       getLogger().debug("List item #" + i + " tranition: " 
               + transition.toString() + ", migrating to context.");
       removedExceptionTransitionList.add(transition);
       getLogger().debug("List item #" + i + " tranition: " 
           + transition.toString() + ", removing from node transition list.");
       ctx.getNode().removeLeavingTransition(transition);
    }
  }

  if (!existingTransitionsList.isEmpty()) {
      // place existing transitions into context variable.
      String ctxStoredTranstionsName = 
           ctx.getNode().getName() + "_stored_transitions_list";
      ctx.setVariable(ctxStoredTranstionsName, removedExceptionTransitionList);
  }
}


State

For a state we work analogue to the decision node but within the extended abstract class that implements the jBPM ActionHandler. This is left as an exercise to the reader.

Tuesday, November 24, 2009

2009 Silver winner for Europe - Financial Crisis Front Lines: SNS Bank


I posted earlier that my chapter was nominated for the Global Awards for Excellence in BPM & Workflow. I received notificaiton as follows:

2009 Silver for Europe— Global Awards for Excellence in BPM & Workflow

This is to congratulate you on the judges voting for SNS Bank IT as the Silver winner for Europe. This is a significant achievement in the face of heavy competition. The Winners and Finalists of this year's awards will be published in the BPM Excellence in Practice 2010. The Excellence in Practice annual book series profiles the winning case studies each year of the new winners of the BPM and Workflow Awards with the emphasis this year on Impact, Innovation and Implementation in BPM Excellence in Practice 2010. The Digital Edition has just been released.


The award was announce live online via a web conference and an engraved trophy will be delivered to the SNS Bank. My thanks to all who made this work possible.

2009 BPM Excellence Awards Ceremony - join live webinar (1800 CET)

As posted earlier, there is an awards ceremony for a jBPM based submission today in a webinar on-line, to join just follow links below at 1800 hrs CET:

THE AWARDS CEREMONY
Date and Time: Tuesday November 24, 2009 at 12 noon EST.
(To check this time in your own region, go to http://timeanddate.com/worldclock/meeting.html
)

Registration: About five minutes before the ceremony begins, click here to join http://bpm.acrobat.com/awards2009/ using your first and last name. You may be required to add the Adobe Flash plug-in if you do not have it.

PROCEDURE AT THE AWARDS CEREMONY:
Derek Miers, lead judge, will describe the major points of each case study after announcing the winner. Gold winners have been invited to contribute a brief 60-second speech highlighting important aspects of their implementation.

The winners of this year's awards will be published in the BPM Excellence in Practice 2010.
The Excellence in Practice annual book series profiles the winning case studies each year of the new winners of the BPM and Workflow Awards with the emphasis this year on Impact, Innovation and Implementation.


I look forward to seeing you at the Awards Ceremony and keep your fingers crossed for our submission!

Friday, November 20, 2009

Devoxx 2009 at the Red Hat stand

I was at Devoxx 2009 in Antwerp, Belgium from Wed, 18 November 2009 to Fri, 20 November 2009. Here is an overview of the photo's taken and the people I met. It was an exhausting experience, but very cool to mingle with so many developers out there creating and maintaining our projects. I especially wanted to thank the SEAM, Drools, RichFaces, Hibernate and jBPM teams for the beers and discussions we had.

Tuesday, November 17, 2009

Open source conference Amsterdam 2009


Here are some pictures of the event held in the Amsterdam Arena. This was very international with lots of European and American visitors. I am including some of the photos I shot of the Red Hat team here in the Benelux and a few of the visitors we took onto the VIP terraces above the field (note the growing lamps used on the grass).




Wednesday, November 11, 2009

JFall 2009 - jBPM in action presented

Wednesday, 11 November 2009 I presented my jBPM in action to around 60 people with pretty good results. You can complete the JFall 2009 evaluation form on the NLJUG site.

Here are a few pictures of the keynote session which is not as full as it has been in the past. Also one of the jBPM core developer Joram Barrez working very hard on the current Jira issues for the upcoming release!

UPDATE: found slideshare!

Wednesday, November 4, 2009

Financial Crisis Front Line: SNS Bank is Finalists in 2009 BPM Global Awards

As previously posted, my chapter in this publication was nominated for the 2009 BPM Global Awards. Surviving the Financial Crisis Front Line: SNS Bank is the story of jBPM as it continues to help the SNS Bank in these tough times.

The finalists have been announced and our jBPM solution at the SNS Bank has been selected for the European region:

Europe
  • Faculty of Manufacturing Technologies, TUKE, Slovakia nominated by Czestochowa University of Technology, Poland
  • Homeloan Management Limited (HML), UK nominated by Lombardi Software, USA
  • SNS Bank IT, Netherlands nominated by Red Hat, Netherlands
  • Swisscard AECS AG, Switzerland nominated by Action Technologies Inc., USA
This year the Awards Ceremony will be presented in a virtual format with the Gold and Silver winners announced in a special webinar on Tuesday November 24, 2009 chaired by Derek Miers, lead judge.

Awards Director Layna Fischer commented on the strength of the entries, especially those implementations with BPM and workflow extending beyond corporate boundaries to support customers, suppliers and trading partners. “We received a record number of high-quality entries in the North America region,” said Ms Fischer. “World-wide, the trend continues to increase of successful integration of multiple systems.”

Keep your fingers crossed on the 24th of November! I wonder if President Obama had anything to do with this (with thanks to Tom for image)?




Tuesday, October 27, 2009

SmartIT Expert Panel - Durf jij te besparen met SmartIT?

I just submitted the following Dutch language article for the opinion section on Smart IT. This is a section devoted to articles on savings by using IT in a smart way (i.e. intelligent).

Durf jij te besparen met SmartIT?
Hoe kun je direct een impact maken op je ICT kosten? Wil je niet af van je dure, proprietary, vendor-locked ICT componenten? Wil je niet tegen je baas kunnen zeggen dat je denkt een manier gevonden te hebben om over te stappennaar een kwalitatief goed component voor een aanzienlijk lager bedrag?
Waar wacht je nog op?
Niets is slimmer dan een inventarisatie te maken van je huidige enterprise software architectuur om er achter te komen dat er veel te besparen valt. Wat dacht je van al die gesloten software componenten met standaard 'licentie' kosten met ook nog supportkosten als bonus er boven op? Je ziet de laatste jaren dat bedrijven hun software architectuur lieten meegaan in de euforie van de groeiende economie. NIets was onmogelijk en met veel geld kwam veel tot stand.
Maar nu? We hebben het allemaal gemerkt. Ontslagen, krimpende budgetten, bezuinigingen op van alles wat met je eigen ICT uitgaven te maken heeft. Maar er is hoop. Er is ruimte voor degenen die op het punt staan om deze dure oplossingen weer eens onder de loep te nemen. Soms gedwongen door bezuiningen, maar bij anderen is het een manier zoeken om ruimte te scheppen voor projecten die nog moeten afgerond worden. Wat je hieraan kunt doen is de tijd nemen om Open Source oplossingen te vergelijken met deze dure componenten in je huidige software architectuur. Er zijn zoveel alternatieven voor alle lagen van je architectuur, van presentatie, data, transport, infrastructuur tot zelfs virtualisatie. Die Open Source componenten en oplossingen zijn er, vaak heb je zelfs meerdere componenten om uit te kiezen.
Maar dit is niet nieuw?
Wat is hieraan zo speciaal vraag je je nu af? Het is namelijk het Open Source model dat uitkomst biedt voor de SmartIT bedrijven. Je software architectuur wordt via een 'subscriptie' model gesupport in plaats van dure licenties. Open Source is gratis, zelfs als je enterprise versies gebruikt. Open Source bedrijven leven van de support contracten. Je neemt een dienst af in de vorm van een 'subscriptie' waarbij zij er dan voor zorgen dat je een organisatie hebt om te bellen bij problemen of vragen. Het verrassende hieraan is dat de kosten zo anders zijn in omvang. Veel bedrijven zijn hiermee bezig, veel bedrijven kloppen zelf aan bij de Open Source organisaties die dit model hanteren. Velen hebben het al ervaren, van groot tot klein kampen wij allemaal met de huidige ICT kosten problematiek.
Durf jij te besparen?

Sunday, October 25, 2009

War belongs in a museum

Due to my own personal past I have an interest in the war history here in Europe that I am surrounded by. I have visited famous historical sites in France, Belgium, Germany and the Netherlands, but today I was in two different worlds in one day.

First was the stop at the WWII museum in Overloon, with an amazing collection of gear including a submarine, several planes and numerous armored vehicles. Much has been updated since my last visit so the trip was well worth it. What struck me most was the motto on the wall: "War belongs in a museum." Outside this location you will find the American flag flying, something that always does my heart a load of good!

The next stop was to a WWII German cemetery in Ysselstijn. This is by far the largest of all the cemeteries I have visited yet. Bigger than above Omah beach, La Cambe or Margraten. Here you find 31,000 graves spread out in a field that is not only large, but leaks out into the various side openings between the trees on the edge. This gives a strange impression as you see even more crosses through the trees no matter which direction you look. A sad, sad sight for anyone to see, no matter what country you come from.


Reblog this post [with Zemanta]

Friday, October 2, 2009

JFall 2009 paper accepted: jBPM in action - past, present and future

The results are in on my submission to JFall 2009:

Original:

"Gefeliciteerd! Bij deze kunnen we je berichten dat je sessie is geselecteerd voor JFall 2009. Op dit moment werken wij aan het samenstellen van het definitieve programma en het plaatsen van de content op onze website."


English:

"Congratulations! Your session submission has been accepted for JFall 2009. At this moment we are working on generating the definite program and placing the content on our website."


See you there?

Wednesday, September 30, 2009

SOA Symposium Rotterdam 22-23 October

I will be at the SOA Symposium in Rotterdam, 22-23 October, check it out in the linked banners here on my site.

Going to be some good speakers, like Mark Little, CTO JBoss.

It will be jointly hosted with the International Cloud Symposium.

See you there?

Friday, September 25, 2009

jBPM paper nominated for award

This summer I had a chapter published in the 2009 BPM & Workflow Handbook.

Not only has this book reached the White House, become a point of discussion with President Obama, but it has now been nominated for the Global Awards for Excellence in BPM & Workflow 2009.

Fingers crossed!

Wednesday, September 23, 2009

JFall 2009 : jBPM in action - past, present and future

Having presented last year, I could not pass when the call for papers was made and I have submitted the following paper to JFall 2009:

Abstract
This session will take the visitor through the current status of jBPM in the field. It will make use of a real world use case to demonstrate the usage as seen over numerous jBPM projects. We will walk you through some of the issues with jBPM v3 that have led to some very interesting applications of the jBPM and finish this section up with a look at how best intentions have led to some possible best practices. We move on then to the future of jBPM and dig into the newest member of the jBPM family, v4. A serious development effort went into simplifying the API and we will provide an overview of these changes. The console was completely overhauled, a new process designer was created for inclusion into your eclipse IDE and last but not least we have a web based BPMN editor. A look at the development team and future project roadmap will be presented. Finally we wrap this session up with a look at migrations from the various versions of jBPM that we have been using in the near and distant past. Several scenarios are examined with some hints and tips provided to help you with your own migration planning.

Does this sound like something you would like to hear?

Wednesday, September 2, 2009

jBPM v4.1 on JBoss 5.0.0.GA - a look at the Signavio web process designer

Today at the opening of JBoss World 2009 the hard working jBPM team announced a new release of jBPM v4.1. I have previously taken a look at pre-released versions of the 4.x, but wanted to dive in again as they have added a web jPDL editor in conjunction with Signavio.

First again, examine the ant build after unzipping the downloaded tarball shows many new features are now available to setup this new jBPM. You can find the complete list of new features and fixes in the jBPM Jira, but note the Tomcat integration.

# Lets look at the build.xml options.
#
$ ant -p
Buildfile: build.xml
     [echo] database......... hsqldb
     [echo] tx............... standalone
     [echo] mail.smtp.host... localhost
     [echo] current dir = /home/mine/java/jbpm-4.1

Main targets:

 clean.cfg.dir                 Deletes the ${cfg.dest.dir}
 create.cfg                    Creates a configuration in ${cfg.dest.dir}
 create.jbpm.schema            creates the jbpm tables in the database
 create.user.webapp            Generates a configuration in dir generated/cfg
 delete.jboss                  Deletes jboss installation
 delete.tomcat                 Deletes tomcat installation
 demo.setup.jboss              installs jboss, installs jbpm into jboss, starts
                               jboss, creates the jBPM DB schema, deploys examples,
                               loads example identities, installs and starts 
                               eclipse
 demo.setup.tomcat             installs tomcat, installs jbpm into tomcat, starts 
                               tomcat, creates the jBPM DB schema, deploys 
                               examples, loads example identities, installs and 
                               starts eclipse
 demo.teardown.jboss           drops the jbpm db schema and stops jboss
 demo.teardown.tomcat          stops tomcat and then the hsqldb server if needed
 drop.jbpm.schema              drops the jbpm tables from the database
 get.eclipse                   downloads eclipse to ${eclipse.distro.dir}
 get.jboss                     Downloads jboss into ${jboss.distro.dir}
 get.tomcat                    Downloads tomcat into ${tomcat.distro.dir} if it 
                               is not available
 hsqldb.databasemanager        start the hsqldb database manager
 install.eclipse               unzips eclipse, downloads eclipse if it is not 
                               available in ${eclipse.distro.dir}
 install.examples.into.tomcat  deploys all the example processes
 install.jboss                 Downloads jboss to ${jboss.distro.dir} if its 
                               not available and then unzips jboss
 install.jbpm.into.jboss       Installs jBPM into JBoss
 install.jbpm.into.tomcat      Installs jBPM into tomcat
 install.tomcat                Downloads tomcat to ${tomcat.distro.dir} if its 
                               not available and then unzips tomcat
 load.example.identities       loads the example users and groups into the database
 reinstall.jboss               Deletes the previous jboss installation and re-installs
                               jboss
 reinstall.jboss.and.jbpm      Deletes the previous jboss installation and re-installs
                               jboss and installs jbpm in it
 reinstall.tomcat              Deletes the previous tomcat installation and re-installs
                               tomcat
 reinstall.tomcat.and.jbpm     Deletes the previous tomcat installation and re-installs 
                               tomcat and installs jbpm in it
 start.eclipse                 starts eclipse
 start.jboss                   starts jboss and waits till jboss is booted, then lets 
                               jboss run in the background
 start.tomcat                  Starts Tomcat and waits till it is booted, then lets 
                               Tomcat run in the background
 stop.jboss                    signals jboss to stop, but doesn't wait till its finished
 stop.tomcat                   Signals Tomcat to stop, but doesn't wait till its finished

The install is pretty straight forward, just need time to allow JBoss v5.0.0.GA and eclipse to download. Other than that, it was a breeze.

# Get some coffee or beer while waiting for this to finish!
#
$ ant demo.setup.jboss

Once this all completes you have an eclipse started and jboss server running in the background. Use the provided user documentation to complete the installation of eclipse (add GPDL plugins and jBPM runtimes). Then you import the examples and start touring!


I was interested in the new web designer so moved over to the web console.
Following the user documentation I log in and it is still looking just as good as the pre-releases, but now with some more features (see Jira).

Now we want to see what this new web editor from Signavio is all about.

# Need to point to the signavio-repo provided in the jBPM installation.
#
$ ant -Dsignavio.repo.path=/home/eschabel/java/jbpm-4.1/signavio-repo 

install.signavio.into.jboss
Buildfile: build.xml
     [echo] database......... hsqldb
     [echo] tx............... standalone
     [echo] mail.smtp.host... localhost
     [echo] current dir = /home/eschabel/java/jbpm-4.1

internal.set.signavio.repo.dir:
    [mkdir] Created dir: /home/eschabel/java/jbpm-4.1/signavio-repo
    [mkdir] Created dir: /home/eschabel/java/jbpm-4.1/install/generated/signavio-unzip-tmp
    [unzip] Expanding: /home/eschabel/java/jbpm-4.1/install/src/signavio/jbpmeditor.war 
            into /home/eschabel/java/jbpm-4.1/install/generated/signavio-unzip-tmp
      [zip] Building zip: /home/eschabel/java/jbpm-4.1/install/generated/
                          signavio-unzip-tmp/jbpmeditor.war
     [copy] Copying 1 file to /home/eschabel/java/jbpm-4.1/install/src/signavio
   [delete] Deleting directory /home/eschabel/java/jbpm-4.1/install/generated/
                               signavio-unzip-tmp

install.signavio.into.jboss:
    [unzip] Expanding: /home/eschabel/java/jbpm-4.1/install/src/signavio/jbpmeditor.war 
            into /home/eschabel/java/jbpm-4.1/jboss-5.0.0.GA/server/default/
                 deploy/jbpmeditor.war

BUILD SUCCESSFUL
Total time: 17 seconds

# And now we can load up the page in our browser.
#
http://localhost:8080/jbpmeditor/p/explorer

I opened a new jPDL project, drew a few things to make a simple empty process, and saved this to a file. Very nice stuff and BPMN 1.2 (with 2.0 on the horizon) too!

One small note, you will need to run this all with Java 1.6. I started with a Java 1.5 environment and that gave all kinds of problems with the web editor which was built with Java 1.6.

Friday, August 28, 2009

JBoss Drools in Rome

The second half of this week I spent in Rome teaching some local rules enthusiasts about the finer points of JBoss Drools.

There is much to see in Rome, but what posting would be complete without at least a picture of the Colosseum. I don't want to make you too jealous, but I spent almost every evening eating dinner (spaghetti and clams, see picture) with this as a backdrop. My hotel was 10 minutes walking distance from the Colosseum!

It is a two day course diving into the details of JBoss Drools v4.0.7 and held in a very beautiful old Rome apartment that functions as the Red Hat offices here. The course was over two days and contains the following topics with extensive technical labs for the students to complete:


Day 1
  • Introduction to JBoss Drools
  • The Drools rule language
  • Domain specific languages
  • Decision tables
  • Business Rules Management System (BRMS)
Day 2
  • The RETE Algorithm
  • Advanced rule authoring
  • Execution control
  • RuleFlow
  • Performance considerations & debugging
If you are contemplating a project with JBoss Drools in the mix, I would strongly recommend that you look into Red Hat training as this course provides a very good foundation. Upon completion you could even become the proud owner of the certificate stating your Drools expertise!

Wednesday, August 26, 2009

jBPM in Rome

Today we finished up the JBoss jBPM training course which took place in Rome, Italy. I was asked to fly in and teach this for some of the local enthusiasts here.

There is much to see in Rome, but what posting would be complete without at least a picture of the Colosseum. I don't want to make you too jealous, but I spent almost every evening eating dinner (spaghetti and clams, see picture) with this as a backdrop. My hotel was 10 minutes walking distance from the Colosseum!

The course covers jBPM v3.x in great detail, and as their was enough interest in the newer version I was able to impart some information regarding the direction jBPM v4.x has taken. It was a very beautiful old Rome apartment that functions as the Red Hat offices here. This is where the course was held, with a very nice balcony to take our breaks on (see picture). The course was over three days and contains the following topics with extensive technical labs for the students to complete:

Day1
  • Introduction to jBPM
  • Process modelling
  • jPDL designer
  • Deployment
Day2
  • Client programming
  • Context variables & expressions
  • Advanced process modelling
  • Task management
Day3
  • Web console
  • Persistence
  • Integration & customization
The students included a business consultant and developers, so the mix was rather interesting. You can see that we even have jBPM chicks out there in the world!

If you are contemplating a project with jBPM in the mix, I would strongly recommend that you look into Red Hat training as this course provides a very good foundation. Upon completion you could even become the proud owner of the certificate stating your jBPM expertise!

Thursday, August 20, 2009

Fedora 11 KDE install

Now that I have upgraded my world to Fedora 11 I wanted to take KDE for a spin. The default is Gnome on the desktop, so here is what I had to do to provide the option to use KDE as a desktop:

# install the kde package group.
#
$ yum install @kde-desktop

# but got some errors that the libavcodec.so.51 was a dependency
# to k3b-extras-freeworld package, but Fedora 11 has a higher 
# version on my machine (libavcodec.so.52), so had to skip-broken
# with yum to avoid installing this package.
#
$ yum --skip-broken instal @kde-desktop

# if you want to default KDE on the machine you can do some or
# all of the following.
#
$ yum install switchdesk-gui switchdesk

# for gui run the switchdesk command and select KDE.
#
$ switchdesk

# for cli run with kde option.
#
$ switchdesk kde 

# for gui to make KDM the default display manager.
#
$ yum install system-switch-displaymanager-gnome

# for cli to switch to KDM display manager.
#
$ yum install system-switch-displaymanager

# for gui run the system-switch-displaymanager command and select KDM.
#
$ system-switch-displaymanager

# for cli run with kdm option.
#
$ system-switch-displaymanager kdm

Not much to it! ;-)

Wednesday, August 19, 2009

Upgrade Fedora 10 to Fedora 11 howto

A few simple steps to upgrade:

# As root you would like to have a clean start to the
# upgrade, so get an update out of the way.
#
$ yum update rpm

$ yum -y update

$ yum clean all

# Should a new kernel install/update require it,
# reboot before continuing with the rest.
#
# Then install the preupgrade package.
#
$ yum install preupgrade

# For console upgrade, use:
#
$ preupgrade-cli

# If you like gui's to upgrade, use this.
#
$ preupgrade

Monday, August 17, 2009

Setup KVM (virtualization) in Fedora 10

I was looking at the various howto's on the internet to get this up and running, but it would not work for me. I kept getting the two error messages below depending on the type of virtualization used (Xen vs. Qemu):

# with Xen I got this when trying to connect my local 
# default machine.
#
Unable to open connection to hypervisor URI 'xen:///'

# and with Qemu I got this when trying to connect my
# local default machine.
#
Unable to open connection to hypervisor 'qemu:///'

A few things needed to be installed for qemu to get this working properly so you can define and install a new virtual machine:

# Standard Virtulization packages in the group which
# once installed will get you to the same error messages
# above once you try to connect your local machine in
# the Virtual Machine Manager.
#
$ yum groupinstall 'Virtualization'

# now we need some qemu stuff:
#
$ yum install qemu qemu-launcher virt-manager virt-mem

After this I could connect to my local machine (qemu:///system) using the Virtual Machine Manager.

Tuesday, August 11, 2009

Letter to President Obama about jBPM

Some of you might remember that I was published with Financial Crisis Front Line: SNS Bank in June of this year in 2009 BPM & Workflow Handbook, which was released at a W3C conference in Washington, DC.

As the focus of this book was BPM in government, the publisher has sent a copy to the President of the United States with a personal cover letter.

My chapter details a financial institution using jBPM. Will jBPM get his attention you think?

Monday, August 10, 2009

Remove your email from Mutt group reply

I was having the problem that I have two email addresses that people send to me from work and when I was replying to a group in Mutt it would include my email in the .cc line. Here is how to prevent that from happening:

# Add this to your .muttrc to prevent your name being
# added to .cc on group replies.
#
alternates "emailA@yourDomain.com|emailB@yourDomain.com"

Friday, August 7, 2009

Display and read HTML mail with mutt

I have lately been running into more people out there who seem to like HTML mail, which did not by default display all that well. Here is how to get mutt to automatically display HTML e-mail in-line:

# In your $HOME you should have (or create one) a .mailcap file,
# add these lines for displaying HTML inline.
#
text/html;      links %s; nametemplate=%s.html
text/html;      links -dump %s; nametemplate=%s.html; copiousoutput

# Then you need to turn on the automagic in mutt to actually
# display the HTML e-mail by adding this to your $HOME/.muttrc
# file.
#
auto_view text/html

Enjoy!

Friday, July 31, 2009

A JBoss BRMS workshop report

 The last week I have spent in Atlanta, GA at the RedHat offices attending a JBoss Business Rules Management System (BRMS) workshop. This was intended to give us a deeper understanding of the lastest rules platform offering that RedHat put together and was intended for a very technical audience.

I wanted to provide a bit of insight into the workshop to give you an idea what you can expect to receive if you should contemplate looking deeper into the JBoss BRMS.

Before I dig into the details and provide my impressions, I wanted to include some side notes on a trip to the USA. As you can see, the breakfast can just be awesome. I love pancakes/biscuits&gravy!

It would also not be America if you did not include something about the cars (picture is of a 1930's hotrod) and a baseball game (picture in Mariners stadium).

The workshop was held in the RedHat JBoss offices and included participants from the all over the globe; Japan, China, India, Argentina, France, Netherlands, and USA . The location was great, the instructors very good, and the kitchen was well stocked with coffee, soda, and snacks (see pictures). It was a three day show covering the following topics:

Day 1:
  • Introduction to JBoss BRMS
  • Rules development process
  • The Drools rule language
  • JBoss DevelStudio - Drools IDE
  • RETE

This day started with a look at rule engines in general and what the BRMS actually includes. It demonstrated these components in action with a demo. The look at a rules development process provided a framework for making your rules projects successful. Covering the Drools rule language took us through the basics, conditions, consequences, and a closer look at the API for those programming interactions with the BRMS. We installed the JBoss DevelStudio, tooling (free if you use the JBoss DevelStudio), and looked at the various components there including the debugging facilities. The day finished with a closer look at how the rule engine really works. Forward chaining and the RETE network was discussed in great detail as we were technical geeks wanting to know exactly how it all worked of course. There were labs for all these topics, allowing us to dig into the details on our own laptops.

Day 2:
  • Decision tables
  • Business Rules Manager: administration and guided rule editor
  • Business Rules Manager: QA and deployment
  • JBDS BMR integration
  • Domain specific languages
Today started with a look at decision tables, as used by a business person to manage their rule base. We imported them and took a closer look at manipulating them through the API. The next topic was the Business Rules Manager (BRM) which is the product branded from the community web interface project better know as Guvnor. We looked at administration, assets, packages, rules, QA, and testing using this interface. My personal opinion is that the testing facilities are one of the stronger points to using this product. Next topic was the integration of the development environment with the BRM interface. We looked at creating a rules repository, exploring it and then adding assets from the developers IDE to be then manipulated/used in the BRM interface. Very good stuff! The day closed out with a detailed look at Domain specific languages (DSL). What a mapping file is, rule files using a DSL, the programming API when using a DSL, and using the DSL in the BRM interface. Again, there were labs for all these topics, allowing us to dig into the details on our own laptops. On a side note, Burr Sutter (Product Manager) joined us for most of the workshop (see picture) to add comments about product direction and jumped in on any questions we might have had with regards to the various products.

Day 3:
  • Advanced rule authoring
  • Execution control
  • Rule flow
  • Complex event processing (CEP)
  • Performance considerations
The final day started by digging into advanced rule authoring concepts like conditional elements, field constraints, nested accessors, property change listeners, and the dynamic rules API. We discussed execution control topics including salience, control facts, groups, duration, no loop, and truth maintenance. We took a closer look into the rules flow and how you can create one, add constraints, deploy it, and run it. This was a lot of fun for me personally as I come from a jBPM background and know that product very well. After lunch we discussed the more advanced topic of Complex event processing (CEP). This included event declaration, semantics, streams support, event cloud, session clock, temporal reasoning, sliding window support, rule based partitioning, and memory management. Performance considerations was a topic that represented the best practices of using the Jboss BRMS. What are the various ways to prevent larger projects from performing poorly due to bad practices or bad rule writing. Again, there were labs for all these topics, allowing us to dig into the details on our own laptops (see picture).

I will be taking this all back to the Europe region and hopefully will be spreading the word soon at a location near you! 

Monday, July 13, 2009

Creating a jBPM process repository for unit testing with par files

My latest project involves general infrastructure improvements based on my experiences with jBPM. There have been many discussions about different aspects involving a generic process structure to enable the launching of new products in a more efficient, timely, and cost effective manner.

One of the more interesting elements in the general planning is to provide the development organization with a process repository. It will enable developers to leverage the existing Maven infrastructure to provide projects with exiting Process Archives, better known to jBPM developers as PAR files.

These files are similar to JAR files and contain the process definition along with any supporting Java classes needed to run. The interesting part is that you want to define simple process components (granularity is important) so that they can be leveraged through reuse. The idea then being that a new project can simply shop for existing process components and then import these exiting PAR files into a project where they plug into the project in process-state nodes (these being the jBPM sub-flows).

This requires that a simple process is the initial building block and needs to be setup with proper unit testing. For example, a simple process (which is left empty for posting purposes) that is used to transform input into some XML format via a single web service call. This call takes place in a state node, so you can see the process definition of the SuperProcess which calls the self contained SubProcess by fishing it out of the PAR repository included in the projects dependencies.

Here the SuperProcess definition:

<process-definition name="superprocess">

  <start-state name="start">
     <transition to="XML transform" name="to_process_state" />
  </start-state>

  <process-state name="XML transform">
    <sub-process name="xmltransform">
    <transition to="end" name="to_end" />
  </process-state>

  <end-state name="end" />

</process-definition>

The SubProcess definition:

<process-definition name="xmltransform">

  <start-state name="start">
    <transition to="end" name="to_end" />
  </start-state>

  <end-state name="end" />

</process-definition>

The unit test for the SubProcess (trivial in this example):

@Test
public void testXmltransformProcess() throws Exception {

  // Extract a process definition from the processdefinition.xml file.
  ProcessDefinition superProcessDefinition = 
    ProcessDefinition.parseXmlResource("xmltransform/processdefinition.xml");

  // Test it.
  assertNotNull("Definition should not be null", superProcessDefinition);

  // Setup superprocesses.
  ProcessInstance superProcessInstance = new ProcessInstance(superProcessDefinition);

  assertEquals(
    "Instance is in start state", 
    superProcessInstance.getRootToken().getNode().getName(), "start");

  // Move the process instance out of start state.
  superProcessInstance.signal();
  
  assertEquals(
    "Instance is in end state", 
    superProcessInstance.getRootToken().getNode().getName(), 
    "end");

  assertTrue("Instance has ended", superProcessInstance.hasEnded());

}

Now the unit test for the SuperProcess:

@Test
public void testSuperProcess() throws Exception {

  // Extract a process definition from the par file.
  ProcessDefinition subProcessDefinition = 
    ProcessDefinition.parseParResource("xmltransform.par");

  ProcessDefinition superProcessDefinition = 
    ProcessDefinition.parseXmlResource("superprocess/processdefinition.xml");

  // Test it.
  assertNotNull("Definition should not be null", subProcessDefinition);
  assertNotNull("Definition should not be null", superProcessDefinition);

  // Setup super and subprocesses.
  ProcessState processState = (ProcessState) superProcessDefinition.getNode("XML transform");
  processState.setSubProcessDefinition(subProcessDefinition);
        
  ProcessInstance superProcessInstance = new ProcessInstance(superProcessDefinition);
  ProcessInstance subProcessInstance   = new ProcessInstance(subProcessDefinition);
   
  // Get our process tokens.
  Token superToken = superProcessInstance.getRootToken();
  Token subToken   = subProcessInstance.getRootToken();

  assertEquals(
    "Instance is in start state",
    superProcessDefinition.getStartState(), 
    superToken.getNode());

  // Move the process instance from its start state to the first state.
  superToken.signal();

  // Subprocess in start?
  assertEquals(
    "SubProcess instance is in start state", 
    subProcessDefinition.getNode("start"), 
    subToken.getNode());
  
  // Move subprocess out of start.
  subToken.signal();
  
  // Subprocess ended?
  assertEquals(
    "SubProcess instance is in end state", 
    subProcessDefinition.getNode("end"), 
    subToken.getNode()); 
  assertTrue("SubProcess instance has ended", subProcessInstance.hasEnded());

  // Superprocess ended?
  assertEquals(
    "SuperProcess instance is in end state", 
    superProcessDefinition.getNode("end"), 
    superToken.getNode()); 
    assertTrue("SuperProcess instance has ended", superProcessInstance.hasEnded());

Of course these are really simple examples. We are looking into unit testing much more complex processes that include task-nodes, state-nodes, and processes with several layers (deep) of process-states. Anyone have experiences with these kinds of unit tests?

Note: these are jBPM v3.x processes.