Tuesday, December 16, 2014

Jump Start Your Rules, Events, Planning and BPM Today

If you are looking to get started with rules, events, planning and BPM projects we have posted here on this site a myriad of examples to get you going.

There are both a JBoss BRMS starter kit and a JBoss BPM Suite starer kit which ties these projects together in a sensible order for you to get going.

This article is to present the work being done the last few weeks on these projects. It is ongoing and focuses on better support for the windows user experience when installing these projects.

Below are the currently updated and tagged projects that have been polished up for windows users based on the product split on functionality of rules, events, planning and BPM.

Rules, events and planning

The following projects have been updated to include improved windows installation support in the init.bat script used to install them:


Rules, events, planning and BPM

The following projects have been updated to include improved windows installation support in the init.bat script used to install them:

Integration projects

These projects are examples of the integration possibilities when looking to leverage multiple products from the JBoss middleware stack in your solutions:
Most this is but a start, more will follow and you can monitor our progress on Twitter as we move forward on these projects.

A bit thanks goes out to our specialist in the windows user experience, Andrew Block, so please give him a shout out on Twitter to thank him for his efforts!


Friday, December 12, 2014

2 Creative JBoss Must Have Items We Love

JBoss stickers have arrived!
Just a short time ago we showcased the historical JBoss BPM Suite & JBoss BRMS stickers along with a few new ones around xPaaS that you can use to liven up your laptops, coffee mugs and just about any surface you want.

Since then we have not sat still, not with the year end holidays just around the corner!

Not only have the new stickers that were ordered arrived, but there are a few last year end events where you can score some really cool JBoss BPM Suite items.

These are the must have items from the 2015 BPM conference season and you can't buy them in stores near you.

The perfect room key.
To obtain one of these amazing keepsakes you will need to locate them in the wild, track down an elusive JBoss BPM Evangelist or Product Manager.

1. Key card

This card is used right now in Las Vegas at the Gartner BPM Conference as your room key. It features the JBoss BPM Suite sponsored slogan of Do Not Disturb

That sure beats the usual hanging sign on a hotel room door, doesn't it?

Nothing quite like that out there compares to this original card that will most likely mean you won't be turning in your hotel room key when you leave.

Rest assured with BPM!

2. Neck pillow

This item is something every BPM traveler should have, a neck pillow. It will get you through the train, bus or plane rides as you make your way to work every day.

Where else can you find such an interesting and useful item related to JBoss and BPM?

We wish you happy hunting as you try to track these items down in the coming months.

You have to admit... JBoss BRMS & BPM Suite have the coolest swag!

Tuesday, December 9, 2014

3 Must See Sessions For Red Hat Summit & DevNation 2015

This years Red Hat Summit conference and co-located DevNation event is being held in Boston, Massachusetts on June 23-26th.

The call for papers is open until 7 Jan 2015, but no time like the present right?

The following are the three must see sessions we are proposing for either Red Hat Summit or DevNation conferences.

There and back with JBoss - the developers journey

As members of the developer fellowship using JBoss, similar to the epic story from Tolkien, we too embark on a journey that takes us from the humble beginnings of projects to the solid towers of products. This session will immerse you in the story of how a project is born, how the developer engages in her first contact with the JBoss community, the discovery of the technology and how this process evolves to something bigger. The journey winds through the JBoss ecosystem and leads to possibilities, often unknown to the user, that bring order, trust and solid enterprise solutions to their daily lives.

Join us for an hour of story telling, epic discoveries, long lost love for the art of solving complex problems with open technology and the warm glow of understanding the big picture of how JBoss ties it all together to support you on each journey to embark upon.

(session: co-submitted with Markus Eisele to DevNation)

Planning not to fail with JBoss Business Resource Optimizer

The saying goes, failing to plan is planing to fail. We don't want to fail, but with the need to accelerate our integration and BPM projects we often have issues with complex resource planning. A roster needs to be planned, beds assigned to patients, a logistics route optimized, cloud instance resource planning to optimize usage of our workloads or even packing solutions for sub-optimal spaces. All these and more will be yours to solve with the help of the Business Resource Optimizer component included with Red Hat JBoss BRMS & BPM Suite products. 

Join us for a few hours, roll up your sleeves and get dirty as we create solutions that plan, organize and optimize.

(lab: co-submitted with Keith Lynch to Red Hat Summit)

Racing Camel with BPM and JBoss Fuse

Do challenges have you wrestling with integration in your business? Are you aware that you can easily merge your enterprise Camel integration with your business processes? 

This lab will guide you through the creation of a customer care project containing several BPM processes that integrate seamlessly with JBoss Fuse, Camel routes, provide full BAM reporting abilities and manage it all wtih Fuse Fabric. Get ready for a few hours of fun and adventure as you kick the tires, because after all, a Camel has no purpose until there is a process.

(lab: co-submitted with Christina Lin to Red Hat Summit)

See you in Boston in June 2015!

Friday, December 5, 2014

2 Ways Of Ensuring You Keep Rocking All JBoss Integration & BPM Demos

As you might have noticed, all of the JBoss BRMS & JBoss BPM Suite demo projects you have come to enjoy were to be migrated into a new organizational group known as JBoss Demo Central.

If you follow me on twitter you would have seen quite a bit of activity over the last week as no less than 35 projects were migrated to JBoss Demo Central.


A nice thing to realize is that all of the original links from the original locations are forwarded to the new JBoss Demo Central locations.

This means your various cloned projects are still functioning just fine, but if you want to be able to just pull in future changes you will have one of two options to get in sync with your projects new home.

1. Search and destroy

This option is the most drastic and is fine if you have a good Internet connection. Just go to JBoss Demo Central, find the project you need to update, throw away your local copy and clone a new copy.

For example:
  1. want to update the JBoss BPM Suite Travel Agency Demo.
  2. locate project in JBoss Demo Central by searching for Travel (or just follow the link in step 1).
  3. remove this locally on our machine:
    • $ rm -rf bpms-travel-agency-demo
  4. clone to our local machine:
    • $ git clone 
Now you are ready to continue to pull updates as they are made available and push any improvements you might have to the project.


2. Modify in place

This option is for you should you not really want to re-clone an entire repository. We will just modify the link in the projects git configuration file to point to the new repo location.

For example:
  1. want to update the JBoss BPM Suite Travel Agency Demo.
  2. locate project in JBoss Demo Central by searching for Travel (or just follow the link in step 1).
  3. copy the HTTPS clone URL:
    • git@github.com:jbossdemocentral/bpms-travel-agency-demo.git
  4. edit the existing local git configuration entry that contains reference to eschabell as follows:
    • edit bpms-travel-agency-demo/.git/config

# The origin entry in your git configuration file for the project
# before moving it to JBoss Demo Central.
#
[remote "origin"]
	url = git@github.com:eschabell/bpms-travel-agency-demo.git
	fetch = +refs/heads/*:refs/remotes/origin/*

We update this link to point to JBoss Demo Central and do a fresh git pull.

# The new origin entry that points to the correct new demo location.
#
#   $ git pull  (to refresh)
#
[remote "origin"]
	url = git@github.com:jbossdemocentral/bpms-travel-agency-demo.git
	fetch = +refs/heads/*:refs/remotes/origin/*

You can also adjust the url for origin by using a git command:

  • $ git remote set-url origin git@github.com:jbossdemocentral/bpms-travel-agency-demo.git 

That's it, now you are ready to continue using any JBoss Integration & BPM demo project you find need updating to their new home in JBoss Demo Central.

Thursday, December 4, 2014

Quick Guide: Dissecting JBoss BPM Cross Process Communication

(Article guest authored together with Jey Paulraj, Senior Solution Architect at Red Hat in North America)

The weeks tips & tricks article will dive in JBoss BPM Suite and specifically a question around how to communicate between two processes. Before we get into the solution details, let us first constrain the use case we will be talking about.

There could be many interpretations around what communication is between two processes, but we will start here with a simple way for one process to call another process. We will also show this simple usage through the provided RestAPI, which we will leverage to provide a deployable artifact that you can leverage as a custom work handler in any BPM process.

The artifact is a class we labeled RestApi.java, it contains the setup and details that make it possible for you to start another process from your existing process.

We provide the class in it's entirety at the end of this article but first we look closer at the various moving parts.

The top of every class includes the various imported objects or classes that will be used, we are most interested in the Knowledge Is Everything (KIE) API components and you will find them listed there along with some objects that represent our healthcare examples domain model.

package org.jboss.demo.heathcare;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

// JBoss BPM Suite API 
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.manager.RuntimeEngine;
import org.kie.api.runtime.process.ProcessInstance;
import org.kie.services.client.api.RemoteRestRuntimeEngineFactory;

// Domain model.
import com.redhat.healthcare.CaseContext;
import com.redhat.healthcare.Doctor;
import com.redhat.healthcare.PatientInfo;
import com.redhat.healthcare.Prescription;
import com.redhat.healthcare.Rxdetail;

Next we will find the actual start of our RestAPI class, where we setup some of the attributes needed to work with the API along with a constructor that will make sure our JBoss BPM Suite server is running. Please note the process deployment ID along with the user and password are fictitious, so any resemblance to actual process data is by chance only.

String deploymentId = "com.redhat.healthcare:patients:1.0";
String bpmUrl = "http://localhost:8080/business-central";
String userId = "admin";
String password = "bpmsuite1!";
URL deploymentUrl;

// Constructor to check for availability of BPM server.
//
public RestApi()  {
   super();
   try {
      this.deploymentUrl = new URL();
   } catch (MalformedURLException e) {
      e.printStackTrace();
   }
}

The URL tested is assuming a basic default local installation, so if your installation is in a different setup you will need to adjust for that.

The next code snippet highlights a core helper method, the one that gets us a reference to the runtime engine. This is the engine that ties us through a RestAPI to a specific deployment, com.redhat.healthcare:patients:1.0 giving us access to start a process in that deployment.

// Get a runtime engine based on RestAPI and our deployment.
//
public RuntimeEngine getRuntimeEngine() {
   RemoteRestRuntimeEngineFactory restSessionFactory 
     = new RemoteRestRuntimeEngineFactory(deploymentId, deploymentUrl, userId, password);

   // create REST request
   RuntimeEngine engine = restSessionFactory.newRuntimeEngine();
   return engine;
}

With a runtime engine we can now access and create our sessions, where we will then be able to start our process instances.

The following method is called to start a process instance and contains for the sake of clarity only, the creation of a collection of data for submission into our process. It should be easy for you to see that this can be abstracted out as needed, for the use of process variables being mapped into your class.

// Setup our session, fill the data needed for process 
// instances and starting our process.
//
public void startProcess() {

   String taskUserId = userId;

   // create REST request.
   RuntimeEngine engine = getRuntimeEngine();
   KieSession ksession = engine.getKieSession();

   // setup data for submission to process instance.
   Doctor doctor = new Doctor();
   doctor.setAddress("3018 winter");
   doctor.setCity("madison");
   doctor.setGender("M");
   doctor.setGroupId("UW1001");
   doctor.setHospital("1001");
   doctor.setName("jey");
   doctor.setState("WI");

   PatientInfo pat = new PatientInfo();
   pat.setAge(12);
   pat.setName("jey");
   pat.setSymbtom("Diabetes Insipidus");
   pat.setType("Diabetes");

   Rxdetail rxdetail = new Rxdetail();
   List<rxdetail> details = new ArrayList<rxdetail>();
   rxdetail.setDrugName("xx");
   rxdetail.setOther("red");
   rxdetail.setQty(11);
   rxdetail.setRxNum(11);
   details.add(rxdetail);

   CaseContext cont = new CaseContext();
   cont.setApprovalReq("N");
   cont.setApprovalReq("Supervisor");
   
   Prescription prescription = new Prescription();
   prescription.setDoctor(doctor);
   prescription.setPatientInfo(pat);
   prescription.setRxdetails(details);

   // collect all data in our map.
   Map<string object=""> params = new HashMap<string object="">();
   params.put("prescription", prescription);
   params.put("caseContext", cont);
   
   // start process.
   ProcessInstance processInstance 
      = ksession.startProcess("healthcare.patientCaseProcess", params);

   // verify process started.
   System.out.println("process id " + processInstance.getProcessId());
   System.out.println("process id " + processInstance.getId());
}

With this method we have setup our doctor, patient and other medical details required by the process, collected them into a map and submitted them to the process instance to kick it all off.

Now we can tie this all together so that the main class that is run when this is called will just setup our RestAPI and start a new process instance each time it is called.

// Start our process by using RestAPI.
//
public static void main(String[] ar) {

   RestApi api = new RestApi();
   api.startProcess();
}

We hope this simple tour through this medical example gives you an idea of how to use the provided JBoss BPM Suite RestAPI to your advantage. In this case we use it for communicating to a specific process in a specific deployment from any other process deployed on our BPM server.

Here is the RestApi class:

package org.jboss.demo.heathcare;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

// JBoss BPM Suite API 
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.manager.RuntimeEngine;
import org.kie.api.runtime.process.ProcessInstance;
import org.kie.services.client.api.RemoteRestRuntimeEngineFactory;

// Domain model.
import com.redhat.healthcare.CaseContext;
import com.redhat.healthcare.Doctor;
import com.redhat.healthcare.PatientInfo;
import com.redhat.healthcare.Prescription;
import com.redhat.healthcare.Rxdetail;

String deploymentId = "com.redhat.healthcare:patients:1.0";
String bpmUrl = "http://localhost:8080/business-central";
String userId = "admin";
String password = "bpmsuite1!";
URL deploymentUrl;

// Constructor to check for availability of BPM server.
//
public RestApi()  {
   super();
   try {
      this.deploymentUrl = new URL();
   } catch (MalformedURLException e) {
      e.printStackTrace();
   }
}

// Get a runtime engine based on RestAPI and our deployment.
//
public RuntimeEngine getRuntimeEngine() {
   RemoteRestRuntimeEngineFactory restSessionFactory 
     = new RemoteRestRuntimeEngineFactory(deploymentId, deploymentUrl, userId, password);

   // create REST request
   RuntimeEngine engine = restSessionFactory.newRuntimeEngine();
   return engine;
}

// Setup our session, fill the data needed for process 
// instances and starting our process.
//
public void startProcess() {

   String taskUserId = userId;

   // create REST request.
   RuntimeEngine engine = getRuntimeEngine();
   KieSession ksession = engine.getKieSession();

   // setup data for submission to process instance.
   Doctor doctor = new Doctor();
   doctor.setAddress("3018 winter");
   doctor.setCity("madison");
   doctor.setGender("M");
   doctor.setGroupId("UW1001");
   doctor.setHospital("1001");
   doctor.setName("jey");
   doctor.setState("WI");

   PatientInfo pat = new PatientInfo();
   pat.setAge(12);
   pat.setName("jey");
   pat.setSymbtom("Diabetes Insipidus");
   pat.setType("Diabetes");

   Rxdetail rxdetail = new Rxdetail();
   List<rxdetail> details = new ArrayList<rxdetail>();
   rxdetail.setDrugName("xx");
   rxdetail.setOther("red");
   rxdetail.setQty(11);
   rxdetail.setRxNum(11);
   details.add(rxdetail);

   CaseContext cont = new CaseContext();
   cont.setApprovalReq("N");
   cont.setApprovalReq("Supervisor");
   
   Prescription prescription = new Prescription();
   prescription.setDoctor(doctor);
   prescription.setPatientInfo(pat);
   prescription.setRxdetails(details);

   // collect all data in our map.
   Map<string object=""> params = new HashMap<string object="">();
   params.put("prescription", prescription);
   params.put("caseContext", cont);
   
   // start process.
   ProcessInstance processInstance 
      = ksession.startProcess("healthcare.patientCaseProcess", params);

   // verify process started.
   System.out.println("process id " + processInstance.getProcessId());
   System.out.println("process id " + processInstance.getId());
}

// Start our process by using RestAPI.
//
public static void main(String[] ar) {

   RestApi api = new RestApi();
   api.startProcess();
}


Friday, November 28, 2014

7 JBoss Stickers You Should See

Historical beginnings of stickers.
Over the years there have been an amazing array of designs, logos and laptop stickers to commemorate various JBoss projects.

On top of that, we have over the last three years attempted to provide some interesting product laptop stickers for those of us that are tied to specific requirements in our enterprises.

These stickers not only adorn our laptop covers, but present a bit of an insight into who we are, what we work on and our devotion to specific areas of JBoss technology.

The following seven laptop stickers are all available if you find me or my colleagues at a conference, event or just hanging out so be sure to ask for them when you bump into a Red Hat JBossian in the wild!

1. I RULE

The classical I RULE, a JBoss BRMS sticker, first one ever done for a product, now 3 years old and evolved into the smaller version you see here.

2. SILENCE!

The SILENCE sticker is the only Complex Event Processing (CEP) sticker we have ever seen for a laptop, so be sure to get this rare find for yourself.

3. DO NOT TOUCH

For JBoss BPM we came up with the DO NOT TOUCH as it was perfect for developers to keep everyone away from your laptop and their sticky fingers to themselves, always a fan favorite.

4. Edwards Deming quote

A process quote from Edwards Deming, probably the most popular JBoss BPM Suite sticker to date.

5. BPM IS MY X

A yet to be released into the wild, a BPM IS MY X xPaaS sticker, so watch for this at your next event.

6. MY X IS BPM

Another yet to be released MY X IS BPM xPaaS sticker, unique for your laptop if you can find one at your next event.

7. WHAT IS YOUR X?

A brand new xPaaS sticker that contains the phrase coined at Devoxx this year in Belgium. Look for this one too at your next event.

These are the laptop stickers you too can start collecting to adorn your work machine to show your JBoss colors. 

Collection growing again...
Even if you end up getting a new laptop and can't transfer the existing coat of stickers (like shown above), you can always start over with these new ones. 

Safe travels to your next JBoss event and happy sticker hunting!