Chapter 2. Migrating from JBoss Enterprise BRMS Platform 5.3.1 to Red Hat JBoss BPM Suite 6.x

2.1. What has changed?

Before starting the migration process, let's find out what exactly has changed between the 5 and 6 branches of Red Hat JBoss BRMS/BPM Suite.

Naming Changes

First and foremost it is important to understand how older components in the 5 branch that you were familiar with relate to in the 6 branch. The biggest change, of course, is the name of the product and it's structure.
JBoss Enterprise BRMS is now called Red Hat JBoss BRMS. Red Hat JBoss BRMS, or JBoss BRMS, is a standalone product with its own workbench and is used solely to create and manage your business rules.
A new product, called Red Hat JBoss BPM Suite, or JBoss BPM Suite encapsulates the JBoss BRMS product and on top of that provides Business Process Management which allows you to create, manage, validate, and deploy Business Processes and Rules.

Component Name Migration

Several components from the 5 branch to 6 branch have been renamed or merged with other components to provide a better working environment. The figure below captures these changes.

API Name Changes

Table 2.1. 

5.x API (deprecated in 6.x) Replaced in 6.x by
org.drools.KnowledgeBase org.kie.api.KieBase
org.drools.runtime.StatefulKnowledgeSession org.kie.api.runtime.KieSession
org.drools.runtime.StatelessKnowledgeSession org.kie.api.runtime.KieSession
org.drools.builder.KnowledgeBuilderFactory org.kie.internal.builder.KnowledgeBuilderFactory
org.drools.io.ResourceFactory org.kie.internal.io.ResourceFactory
org.drools.io.ResourceType org.kie.internal.io.ResourceType
org.drools.runtime.Environment org.kie.api.runtime.Environment
org.drools.runtime.EnvironmentName org.kie.api.runtime.EnvironmentName
org.drools.runtime.KnowledgeSessionConfiguration org.kie.api.runtime.KieSessionConfiguration
org.drools.event.AgendaEventListener org.kie.api.event.rule.AgendaEventListener
org.drools.event.rule.AgendaEventListener org.kie.api.event.rule.AgendaEventListener
org.drools.event.DefaultAgendaEventListener org.kie.drools.core.event.DefaultAgendaEventListener
org.drools.event.rule.DefaultAgendaEventListener org.kie.api.event.rule.DefaultAgendaEventListener
org.drools.event.process.ProcessEventListener org.kie.api.event.process.ProcessEventListener
org.drools.event.process.DefaultProcessEventListener org.kie.api.event.process.DefaultProcessEventListener
org.drools.logger.KnowledgeRuntimeLogger org.kie.api.logger.KieRuntimeLogger
org.drools.logger.KnowledgeRuntimeLoggerFactory org.kie.api.logger.KieLoggers

Repository Change

Red Hat JBoss BRMS and JBoss BPM Suite 6 are backed by a GIT repository for source management while JBoss BRMS 5 was backed by a JCR/JackRabbit implementation. A tool to migrate the repository to GIT is provided and discussed later in this guide.

Changes to the REST API

The base url for working with the REST API has changed from http://SERVER_ADDRESS:PORT/jboss-brms/rest/ to http://SERVER_ADDRESS:PORT/business-central/rest/

Migrating Task Service

JBoss BPMS 6 provides support for a locally running task server only. This means that you don't need to setup any messaging service in your project. This differs from JBoss BRMS 5 because it provided a task server that was bridged from the core engine by using, most commonly, the messaging system provided by HornetQ.
To help you bridge the gap until you can migrate this in your current architecture, there is a helper or utility method, LocalHTWorkItemHandler located in org.jbpm.services.task.wih.
Since the TaskService API is part of the public API you will now need to refactor your imports because of package changes and refactor your methods due to API changes themselves.

Logging factory

Besides the API name change, logging is now implemented through the org.kie.api.logger package which contains the factory class KieLoggers that can be used to create instances of the KieRuntimeLogger.