Getting Started Guide

Red Hat JBoss BPM Suite 6.0

The Getting Started Guide for Red Hat JBoss BPM Suite

Kanchan Desai

Doug Hoffman

Eva Kopalova

Red Hat Content Services

Abstract

This guide is to help users install and set up Red Hat JBoss BPM Suite for the first time

Chapter 1. Introduction

1.1. About Red Hat JBoss BPM Suite

Red Hat JBoss BPM Suite is an open source business process management suite that combines Business Process Management and Business Rules Management and enables business and IT users to create, manage, validate, and deploy Business Processes and Rules.
Red Hat JBoss BRMS and Red Hat JBoss BPM Suite use a centralized repository where all resources are stored. This ensures consistency, transparency, and the ability to audit across the business. Business users can modify business logic and business processes without requiring assistance from IT personnel.
To accommodate Business Rules component, Red Hat JBoss BPM Suite includes integrated Red Hat JBoss BRMS.
Business Resource Planner is included as a technical preview with this release.

1.2. Red Hat JBoss BPM Suite components

The Red Hat JBoss BPM Suite contains the following components:
Execution Engine
The runtime environment for business assets (Processes, Tasks, Rules, etc.). For further details, refer to the Red Hat JBoss BPM Suite Administration and Configuration Guide.
Artifact Repository (Knowledge Store)
A storage for business assets that provide revision control capabilities (connects GIT repositories with business assets).
Business Central
A web-based application for asset creation, management, and monitoring of business assets providing an integrated environment with the respective tools, such as, rule and process authoring tools, business asset management tool for work with Artifact Repository, runtime data management tools, resource editors, BAM (Business Activity Monitoring) tools, Task management tools, and BRMS tools. For further details, refer to the Red Hat JBoss BPM Suite User Guide.

1.3. Use Case: Process­-based solutions in the loan industry

Red Hat JBoss BPM Suite (BPMS) can be deployed to automate business processes, such as automating the loan approval process at a retail bank. This is a typical 'Specific Process-Based' deployment that might be the first step in a wider adoption of BPM throughout an enterprise. It leverages both the BPM and business rules features of BPMS.
A retail bank offers several types of loan products each with varying terms and eligibility requirements. Customers requiring a loan must file a loan application with the bank, which then processes the application in several steps, verifying eligibility, determining terms, checking for fraudulent activity, and determining the most appropriate loan product. Once approved, the bank creates and funds a loan account for the applicant, who can then access funds. The bank must be sure to comply with all relevant banking regulations at each step of the process, and needs to manage its loan portfolio to maximize profitability. Policies are in place to aid in decision making at each step, and those policies are actively managed to optimize outcomes for the bank.
Business analysts at the bank model the loan application processes using the BPMN2 authoring tools (Process Designer) in BPM Suite:
High-level loan application process flow

Figure 1.1. High-level loan application process flow

Business rules are developed with the rule authoring tools in BPM Suite to enforce policies and make decisions. Rules are linked with the process models to enforce the correct policies at each process step.
The bank's IT organization deploys the BPM Suite so that the entire loan application process can be automated.
Loan Application Process Automation

Figure 1.2. Loan Application Process Automation

The entire loan process and rules can be modified at any time by the bank's business analysts. The bank is able to maintain constant compliance with changing regulations, and is able to quickly introduce new loan products and improve loan policies in order to compete effectively and drive profitability.

Chapter 2. Quick start with Red Hat JBoss BPM Suite

In this section we download, install and run Red Hat JBoss BPM Suite with the minimum number of instructions. For more detailed steps and alternate methods of installation, skip this section and continue reading the rest of this guide.
These instructions assume that you have the minimum supported Java version installed on your system. An existing Red Hat JBoss EAP server is not required as the installer installs one if one cannot be detected.

Procedure 2.1. BPM Suite Quick Start

  1. Download BPM Suite installer from access.redhat.com.
  2. Run installer by executing the following command:
    java -jar jboss-bpms-installer-VERSION.GA-redhat-MINOR.jar
  3. Step through the GUI installer steps making note of the username/password for accessing the BPM Suite application after installation.
  4. After successful installation, in a command prompt, navigate to the EAP home folder where you have installed BPM Suite.
  5. Start the BPM Suite server by issuing the following command.
    bin/standalone.sh
  6. Open a web browser and login to Business Central by navigating to http://localhost:8080/business-central/. Login using the username/password combination for accessing the BPM Suite application that you created at installation time.
You have successfully installed and run BPM Suite. You can now do the following:
Learn more about roles: Section 3.1.3, “Defining Roles”
Create additional users: Section 3.1.4, “Creating users”
Create a Hello World Project: Chapter 5, Hello World project
Work through the BPM Example App Guide Working with the BPM Suite Example App
Look up detailed installation instructions for using the installer: Installation Guide

Chapter 3. Installation options

Red Hat JBoss BPM Suite comes in two versions:
  • Executable jar installer for installation on Red Hat JBoss Enterprise Application Platform (EAP) 6.1.1.
  • Zip file install which itself comes in two versions:
    • jboss-bpms-6.MINOR_VERSION-redhat-x-deployable-eap6.x.zip: version adapted for deployment on Red Hat JBoss Enterprise Application Platform (EAP 6.1.1).
    • jboss-bpms-6.MINOR_VERSION-redhat-x-deployable-generic.zip: the deployable version with additional libraries adapted for deployment on Red Hat JBoss Web Server (WS), Apache Tomcat 6, and Apache Tomcat 7.
Depending on your environment, you may choose the installation option best suited for your project needs.

Note

Red Hat JBoss BPM Suite is designed to work with UTF-8 encoding. If a different encoding system is used by the underlying JVM, unexpected errors might occur. To ensure UTF-8 is used by the JVM, use the following system property "-Dfile.encoding=UTF-8".

3.1. The EAP6 bundle installation

This section describes installing the Red Hat JBoss BPM Suite package deployable for Red Hat JBoss Enterprise Application Platform (EAP).

Note

The minimum supported configuration of Red Hat JBoss EAP for Red Hat JBoss BPM Suite installation is 6.1.1 and not 6.1.0.

3.1.1. Downloading the EAP6 package

To download the deployable Red Hat JBoss BPM Suite package for JBoss Enterprise Application Platform, do the following:
  1. Go to the Red Hat Customer Portal and log in.
  2. Click DownloadsProducts Downloads.
  3. In the Product Downloads page that opens, click Red Hat JBoss BPM Suite.
  4. From the Version drop-down menu, select version 6.0.3.
  5. On the Software Downloads page that opens, navigate to the Red Hat JBoss BPM Suite 6.0.3 Deployable for EAP 6.1.1 row and click Download.

3.1.2. Installing the EAP6 package

Installation on a fresh EAP instance

To install the deployable package for an EAP that has yet to be configured, do the following:
  1. Extract the zip package deployable for EAP you downloaded from the Red Hat Customer Portal.
  2. Merge the extracted zip package deployable for EAP into the EAP SERVER_HOME directory.

    Warning

    This step must be performed by the same user account that was used to install EAP. This account must not be a superuser account.
  3. In this process, multiple files in the EAP SERVER_HOME directory will be overwritten and you must let the unzip process overwrite these files. An example of a file that is overwritten is the SERVER_HOME/bin/product.conf file. After a successful merge, this file must contain the string slot=bpms. You can open this file to verify that the files have been overwritten successfully.
In Red Hat Enterprise Linux, you can use the following command to extract the BPMS zip file and merge it into your server directory correctly in one step, if you execute this command in the directory where you have downloaded the zip file:
unzip -u jboss-bpms-VERSION-TYPE.zip -d SERVER_HOME_PARENT_DIR

Example 3.1. The unzip command

unzip -u jboss-bpms-6.0.3-redhat-7-deployable-eap6.x.zip -d /home/john/myServers/
On server start-up, Red Hat JBoss BPM Suite will be deployed.

Installation on an existing EAP configuration

Warning

These instructions are for installing, and NOT for updating an existing BPMS instance. Make sure that there is no existing BPMS install in the target EAP.
To install the deployable package for a previously configured EAP, do the following:
  1. Extract the zip package deployable for EAP you downloaded from the Red Hat Customer Portal.
  2. Unzip the downloaded zip archive; however, do not overwrite all of the files. Manually merge the following files into the SERVER_HOME directory.
    • jboss-eap-6.1/domain/configuration/* - (please be aware that BPMS requires JMS, so JMS is added by default into all profiles in domain.xml provided by BPMS distribution.)
    • jboss-eap-6.1/standalone/configuration/* - (please be aware that BPMS requires JMS, so JMS is added by default into all profiles config files (especially into standalone.xml and standalone-ha.xml) provided by BPMS distribution.)
    • jboss-eap-6.1/modules/layers.conf
    • jboss-eap-6.1/bin/product.conf
  3. Ensure the target EAP does not include a deployment with a colliding name. Copy the folder jboss-eap-6.1/standalone/deployments into the EAP_HOME directory from the BPMS distribution.
  4. Make sure no EAP module layer is already called BPMS and copy the folder jboss-eap-6.1/modules/system/layers/bpms into the EAP 6.1.1 folder.

3.1.3. Defining Roles

Before starting the server and logging onto Business Central, you will need to create some user accounts. This section describes the different user roles that are used in Red Hat JBoss BPM Suite :
  • admin: The users with admin role are the administrators of the application. Administrators can manage users, manage the repositories (create and clone) and have full access to make the required changes in the application. Admins have access to all areas within the system.
  • developer: A developer has access to almost all features and can manage rules, models, process flows, forms and dashboards. They can manage the asset repository, they can create, build and deploy projects and they can even use Red Hat JBoss Developer Studio to view processes. Only certain administrative functions like creating and cloning a new repository are hidden for the developer role.
  • analyst: An analyst role has access to all high-level features to model and execute their projects. However, AuthoringAdministration access is unavailable to users with the analyst role. Certain lower-level features targeted towards developers, like the DeploymentArtifact Repository view are not accessible for this role. However, the Build & Deploy button is available for the analyst role while using the Project Editor.
  • user: User or a business user work on the business task lists that are used to operate a certain process. A user with this role can access the dashboard and manage processes.
  • manager: A manager is a viewer of the system and is interested in statistics around the business processes and their performance, business indicators, and other reporting of the system. A user with this role has access to the BAM only.

Note

Enter the above mentioned roles during the user creation process.

3.1.4. Creating users

To start adding new users, you will need to run the add-user.sh script on a Unix system or the add-user.bat file on a Windows system from the EAP bin directory.
  1. Run ./add-user.sh on a Unix system or add-user.bat on a Windows system from the bin directory.
  2. Enter b to select an Application User at the type of user prompt and press Enter.
  3. Accept the default Realm (ApplicationRealm): by pressing Enter.
  4. At the username prompt, enter a user name and confirm. For example: helloworlduser.
  5. Create the user's password at the password prompt and reenter the password. For example: Helloworld@123.

    Note

    The password should be at least 8 characters in length and should contain upper and lower case alphabetic characters (e.g. A-Z, a-z), at least one numerical character (e.g. 0-9) and at least one special character (e.g. ~ ! @ # $ % ^ * ( ) - _ + =).
  6. Enter a comma separate list of roles the user will need at the roles prompt (refer to Section 3.1.3, “Defining Roles”).
    Business Central users need to have at least the analyst role, and dashbuilder users need to have the admin role. Roles should be entered as a comma-separated list.
  7. Confirm you want to add the user.
  8. Enter yes at the next prompt (this is to enable clustering in the future if required).

3.2. The generic deployable bundle installation

To install Red Hat JBoss BPM Suite on Red Hat JBoss Web Server (WS) , you need to use the generic deployable package of the product.
For installation on WS, the generic deployable package contains additional transaction manager and security libraries that are not part of Red Hat JBoss WS.
Note that the generic deployable package contains the following zip archives:
  • jboss-bpms-engine.zip: supported execution engine libraries needed if you are embedding the engine into your application
  • jboss-bpms-manager.zip: the business-central.war and dashbuilder.war web applications

3.2.1. Downloading the generic deployable package

To download the generic deployable Red Hat JBoss BPM Suite package for JBoss Web Server, do the following:
  1. Go to the Red Hat Customer Portal and log in.
  2. Select DownloadsProduct Downloads.
  3. From the list of products click on Red Hat JBoss BPM Suite.
  4. From the Version drop-down menu, select version 6.0.3.
  5. In the Software Downloads section that comes up, navigate to the Red Hat JBoss BPM Suite 6.0.3 Deployable for all supported containers row and then click Download.

3.2.2. Installing the generic deployable package

To install the generic deployable package, you need to set up the following after you have installed the underlying platform (Red Hat JBoss WS):

3.2.2.1. Setting up transaction manager for Red Hat JBoss Web Server 2.0 (Tomcat 7)

  1. Extract the generic deployable zip package you downloaded from Red Hat Customer Portal. This zip package contains two more zip files: jboss-bpms-engine.zip and jboss-bpms-manager.zip.
  2. Extract the contents of the jboss-bpms-manager.zip file to a temporary location. This zip file contains two web application archive folders: business-central.war and dashbuilder.war in exploded formats and these are now in your temporary location. Rename these folders to remove the .war extension.
    Copy both these folders directly under the $TOMCAT_DIR/webapps folder.
    You should end up with two folders in exploded format: $TOMCAT_DIR/webapps/business-central and $TOMCAT_DIR/webapps/dashbuilder.

    Note

    $TOMCAT_DIR stands for the home directory where your web server is located. Replace it with the actual path to your web server home directory, for example: /home/john/jboss-ews-2.0/tomcat7/
  3. Extract the jboss-bpms-engine folder from the jboss-bpms-engine.zip archive to a temporary location from where you can copy the required libraries. This folder now contains all the core BPMS libraries under the extracted folder and a lib folder.
  4. Install the transaction manager.

    Warning

    Please note that the following section describes the setup of a transaction manager, Bitronix that is not officially supported by Red Hat.
    Copy the following transaction manager jar libraries from the lib folder where you just extracted the jboss-bpms-engine libraries to $TOMCAT_DIR/lib/ directory:
    • btm-VERSION.jar
    • btm-tomcat55-lifecycle-VERSION.jar
    • jta-VERSION.jar
    • slf4j-api-VERSION.jar
    • slf4j-ext-VERSION.jar
    In addition, download the following library and copy it into the $TOMCAT_DIR/lib/ folder as well:
  5. Install the driver to your database: copy the jar file with the relevant database driver to $TOMCAT_DIR/lib/.

    Note

    If using the embedded H2 database, the driver is available in business-central/WEB-INF/lib/.
  6. Create the transaction manager configuration files in $TOMCAT_DIR/conf/:
    • btm-config.properties
      bitronix.tm.serverId=tomcat-btm-node0
      bitronix.tm.journal.disk.logPart1Filename=${btm.root}/work/btm1.tlog
      bitronix.tm.journal.disk.logPart2Filename=${btm.root}/work/btm2.tlog
      bitronix.tm.resource.configuration=${btm.root}/conf/resources.properties
      
    • resources.properties (the resource.ds1.uniqueName defines the datasource name used in tomcat resource definition later - make a note of this value).
      Make sure to change the values in the following definitions to match your environment.

      Example 3.2. H2 datasource definition

      resource.ds1.className=bitronix.tm.resource.jdbc.lrc.LrcXADataSource
      resource.ds1.uniqueName=jdbc/jbpm
      resource.ds1.minPoolSize=10
      resource.ds1.maxPoolSize=20
      resource.ds1.driverProperties.driverClassName=org.h2.Driver
      resource.ds1.driverProperties.url=jdbc:h2:file:~/jbpm
      resource.ds1.driverProperties.user=sa
      resource.ds1.driverProperties.password=
      resource.ds1.allowLocalTransactions=true

      Example 3.3. MySQL 5.5 datasource definition

      resource.ds1.className=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
      resource.ds1.uniqueName=jdbc/jbpm
      resource.ds1.minPoolSize=0
      resource.ds1.maxPoolSize=10
      resource.ds1.driverProperties.URL=jdbc:mysql://localhost:3306/sampledb
      resource.ds1.driverProperties.user=dbuser
      resource.ds1.driverProperties.password=dbpassword
      resource.ds1.allowLocalTransactions=true

      Example 3.4. DB2 Type 4 datasource definition

      resource.ds1.className=com.ibm.db2.jcc.DB2Driver
      resource.ds1.uniqueName=jdbc/jbpm
      resource.ds1.minPoolSize=0
      resource.ds1.maxPoolSize=10
      resource.ds1.driverProperties.URL=jdbc:db2://localhost:50000/sampledb
      resource.ds1.driverProperties.user=dbuser
      resource.ds1.driverProperties.password=dbpassword
      resource.ds1.allowLocalTransactions=true

      Example 3.5. Oracle datasource definition

      resource.ds1.className=oracle.jdbc.xa.client.OracleXADataSource
      resource.ds1.uniqueName=jdbc/jbpm
      resource.ds1.minPoolSize=0
      resource.ds1.maxPoolSize=10
      resource.ds1.driverProperties.URL=jdbc:oracle:thin:@//localhost:1521/bpms 
      resource.ds1.driverProperties.user=dbuser
      resource.ds1.driverProperties.password=dbpassword
      resource.ds1.allowLocalTransactions=true

      Example 3.6. Microsoft SQL Server datasource definition

      resource.ds1.className=com.microsoft.sqlserver.jdbc.SQLServerDriver
      resource.ds1.uniqueName=jdbc/jbpm
      resource.ds1.minPoolSize=0
      resource.ds1.maxPoolSize=10
      resource.ds1.driverProperties.URL=jdbc:sqlserver://localhost:1433;databaseName=bpms;
      resource.ds1.driverProperties.user=dbuser
      resource.ds1.driverProperties.password=dbpassword
      resource.ds1.allowLocalTransactions=true
  7. Set up the transaction manager listener in $TOMCAT_DIR/conf/server.xml to start and stop Bitronix on container startup and shutdown:
    Add the following element as the last <Listener> element into the <Server> element:
    <Listener className="bitronix.tm.integration.tomcat55.BTMLifecycleListener" />
    
  8. Define the btm.root system property and location where bitronix config file is placed:
    In $TOMCAT_DIR/bin/, create the setenv.sh file with the following content:
    CATALINA_OPTS="-Xmx512M -XX:MaxPermSize=512m -Dbtm.root=$CATALINA_HOME -Dbitronix.tm.configuration=$CATALINA_HOME/conf/btm-config.properties -Dorg.jbpm.designer.perspective=RuleFlow -Djbpm.tsr.jndi.lookup=java:comp/env/TransactionSynchronizationRegistry"
    The property org.jbpm.designer.perspective is set to RuleFlow to allow the default perspective for the designer to be RuleFlow rather than Full. Grant the file execute permissions if applicable.

    Important

    On Microsoft Windows systems, replace the $CATALINA_HOME value in the content of the file with the equivalent environment variable name or use the absolute path and add the values in setenv.bat file as shown here in the following example:
    set "CATALINA_OPTS=-Xmx512M -XX:MaxPermSize=512m -Dbtm.root=C:/Tomcat -Dbitronix.tm.configuration=C:/Tomcat/conf/btm-config.properties -Dorg.jbpm.designer.perspective=RuleFlow"

3.2.2.2. Setting up Business Central for Red Hat JBoss Web Server 2.0 (Tomcat 7)

To set up Business Central, do the following:
  1. Set up a Valve so that the Business Central web application can load the users set up in Tomcat:
    1. Define users and roles in $TOMCAT_DIR/conf/tomcat-users.xml. Note that Business Central requires users to have the roles specified as admin and/or analyst (for more information about user and role definitions, refer to the Tomcat 7 documentation).
      The program listing below shows an example of how these two roles would be added and how a user named bpmsadmin will be assigned these roles.
        <role rolename="admin"/>
        <role rolename="analyst" />
        <user username="bpmsadmin" password="P@ssw0rd" roles="admin,analyst"/>
      
      
    2. Copy kie-tomcat-integration-VERSION.jar from $TOMCAT_DIR/webapps/business-central/WEB-INF/lib/ to $TOMCAT_DIR/lib/.
    3. Copy jaxb-api-VERSION.jar from $TOMCAT_DIR/webapps/business-central/WEB-INF/lib/ to $TOMCAT_DIR/lib/.
    4. In $TOMCAT_DIR/conf/server.xml, add the Tomcat Valve declaration in the relevant <host> element:
      <Valve className="org.kie.integration.tomcat.JACCValve" />
      
    5. In $TOMCAT_DIR/webapps/business-central/WEB-INF/web.xml, uncomment entries marked with the TOMCAT-JEE-SECURITY comments.
    6. Set up the tomcat authentication source: in the $TOMCAT_DIR/webapps/business-central/WEB-INF/classes/META-INF/services/ directory, rename the following files: org.uberfire.security.auth.AuthenticationSource to org.uberfire.security.auth.AuthenticationSource-ORIGIN and org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY to org.uberfire.security.auth.AuthenticationSource:
      # Example command if you run this from $TOMCAT_DIR/webapps directory 
      $ mv business-central/WEB-INF/classes/META-INF/services/org.uberfire.security.auth.AuthenticationSource business-central/WEB-INF/classes/META-INF/services/org.uberfire.security.auth.AuthenticationSource-ORIGIN
      $ mv business-central/WEB-INF/classes/META-INF/services/org.uberfire.security.auth.AuthenticationSource-TOMCAT-JEE-SECURITY business-central/WEB-INF/classes/META-INF/services/org.uberfire.security.auth.AuthenticationSource
      
    7. In $TOMCAT_DIR/webapps/business-central/WEB-INF/beans.xml, uncomment JAASUserGroupInfoProducer and comment org.jbpm.kie.services.cdi.producer.DefaultUserGroupInfoProducer (optional). The alternatives part of this file should now look like this:
        <alternatives>
          <!--    <class>org.jbpm.kie.services.cdi.producer.DefaultUserGroupInfoProducer</class> -->
          <!-- uncomment JAASUserGroupInfoProducer when using JEE security on Tomcat -->
          <class>org.jbpm.kie.services.cdi.producer.JAASUserGroupInfoProducer</class>
        </alternatives>						
      					
      
      
  2. If you are using a datasource other than the default provided by the underlying H2 database, you will need to setup persistence. If you are using the default H2 database, then you can ignore the rest of the steps in this procedure.
    In this procedure, you configure a datasource with the JNDI name jdbc/myDatasource as defined in uniqueName=jdbc/jbpm in the bitronix resources.properties file earlier (for the MySQL option).
    1. In business-central/META-INF/context.xml, replace the datasource JNDI name in the <Resource> element. The uniqueName attribute refers to the resource.ds1.uniqueName property set in resources.properties:
      <Resource name="jdbc/myDatasource" uniqueName="jdbc/jbpm" auth="Container" removeAbandoned="true" factory="bitronix.tm.resource.ResourceObjectFactory" type="javax.sql.DataSource"/>
      
    2. In business-central/WEB-INF/web.xml, replace the datasource JNDI name in the <res-ref-name> element with your datasource name:
      <resource-ref>
              <description>Console DS</description>
              <res-ref-name>jdbc/myDatasource</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
      </resource-ref>
      
    3. Change business-central/WEB-INF/classes/META-INF/persistence.xml.
      In this file, change the name of the hibernate dialect used for your database, if using a different database other than H2. The code below demonstrates the original database information for persistence.xml:
      <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
      
      This information can be updated in the following manner (as demonstrated with MySQL database below):
      <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
      

      Note

      The dialect for DB2 is org.hibernate.dialect.DB2Dialect, for DB2 on AS/400 is org.hibernate.dialect.DB2400Dialect, for Oracle is org.hibernate.dialect.Oracle10gDialect and for Microsoft SQL Server is org.hibernate.dialect.SQLServerDialect
    4. Change business-central/WEB-INF/classes/META-INF/persistence.xml file so that BPMS process engine can use the new database.
      The code below demonstrates the original datasource information for persistence.xml:
      <jta-data-source>java:comp/env/jdbc/jbpm</jta-data-source>
      
      Change this value to the datasource defined earlier:
      <jta-data-source>java:comp/env/jdbc/myDatasource</jta-data-source>
      
  3. You can now start the JBoss Web Server to login to Business Central.
    1. Run startup.sh in the $TOMCAT_HOME/bin directory.
      ./startup.sh
    2. Navigate to http://localhost:8080/business-central in a web browser.
    3. Login with the correct username/password as given in the tomcat-users.xml file where you defined user roles.

3.2.2.3. Setting up Dashbuilder for Red Hat JBoss Web Server 2.0 (Tomcat 7)

To set up Dashbuilder on Red Hat JBoss Web Server, do the following:
  1. Define users and roles in $TOMCAT_DIR/conf/tomcat-users.xml. Note that Dashbuilder requires users to have the role specified as admin and/or analyst. If you have already defined these users earlier for Business-Central, you don't need to define them again.
  2. Enable single sign-on between Dashbuilder and Business Central by uncommenting the following lines in $TOMCAT_DIR/conf/server.xml file:
    <Valve className="org.apache.catalina.authenticator.SingleSignOn" />
  3. As with Business Central setup, if you are using a database other than the default and integrated H2 database, you will need to setup persistence.
    In this procedure, you configure a datasource with the JNDI name jdbc/dashbuilderDS as defined in uniqueName=jdbc/jbpm in the bitronix resources.properties file:
    1. In dashbuilder/META-INF/context.xml, replace the datasource JNDI name in the <Resource> element. The uniqueName attribute refers to the resource.ds1.uniqueName property set in resources.properties:
      <Resource name="jdbc/dashbuilderDS" uniqueName="jdbc/jbpm" auth="Container" removeAbandoned="true" factory="bitronix.tm.resource.ResourceObjectFactory" type="javax.sql.DataSource"/>
      

      Note

      Depending upon your database, you may need to define some other properties here as well. For example, in an Oracle environment, this entry may look like the following listing.
      <Resource name="jdbc/jbpm" uniqueName="jdbc/jbpm" auth="Container"  removeAbandoned="true" factory="bitronix.tm.resource.ResourceObjectFactory" type="javax.sql.DataSource" username="username" password="password"  driverClassName="oracle.jdbc.xa.client.OracleXADataSource" url="jdbc:oracle:thin:YOUR-URL:1521:YOUR-DB" maxActive="8" />
      
      
    2. In dashbuilder/WEB-INF/web.xml, add the datasource JNDI name in the <res-ref-name> element with your datasource name:
      <resource-ref>
          <description>Dashboard Builder Datasource</description>
          <res-ref-name>jdbc/dashbuilderDS</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
      </resource-ref>
      
    3. In dashbuilder/META-INF/context.xml, define the transaction factory:
       <Transaction factory="bitronix.tm.BitronixUserTransactionObjectFactory"/>
      
    4. Update the datasource JNDI name in dashbuilder/WEB-INF/etc/hibernate.cfg.xml in the <session-factory> element:
      <property name="connection.datasource">java:/comp/env/jdbc/dashbuilderDS</property>
      
  4. Restart Java Web server for these changes to take effect. Once restarted, you can navigate to Dashbuilder from within Business Central or directly via: http://localhost:8080/dashbuilder.

3.3. Starting the server

If you have installed BPMS using either the Installer or via the EAP6 bundle install, you can now start your server in one of two modes.

Note

If you installed BPMS using the generic deployable version on Red Hat Java Web Server, the instructions for download and install also contain the instructions for starting the server. You can ignore the following discussion.
The default startup script, standalone.sh that Red Hat JBoss BPM Suite ships with is optimized for performance. To run your server in the performance mode, do the following:
  1. On the command line, move into the $SERVER_HOME/bin/ directory.
  2. In a Unix environment run:
    ./standalone.sh
    In a Windows environment run:
    ./standalone.bat
Red Hat JBoss BPM Suite also ships with a separate script, standalone-secure.sh that is optimized for security. This script applies a security policy by default that protects against a known security vulnerability.

Note

It is recommended that production environments use standalone-secure.sh script.

Warning

The use of a security manager imposes a significant performance penalty that you should be aware of. The tradeoff between security and performance must be made by taking into consideration individual circumstances. See Section 3.4, “Java Security Manager and performance management”.
To run your server in the secure mode with this script, do the following:
  1. On the command line, move into the $SERVER_HOME/bin/ directory.
  2. In a Unix environment run:
    ./standalone-secure.sh
    In a Windows environment run:
    ./standalone-secure.bat

3.4. Java Security Manager and performance management

As noted earlier, enabling the Java Security Manager (JSM) to sandbox the evaluation of MVEL scripts in BPMS introduces a performance hit in high load environments. Environments and performance markers must be kept in mind when deploying a BPMS application. Use the following guidelines to deploy secure and high performance BPMS applications.
  • In high load environments where performance is critical it is recommended to only deploy applications that have been developed on other systems and properly reviewed. It is also recommended not to create any users with Analyst role on such systems. If these safeguards are followed, it is safe to leave JSM disabled on these systems so it does not introduce any performance degradation.
  • In testing and development environments without high loads, or in environments where rule and process authoring is exposed to external networks, it is recommended to have JSM enabled in order to achieve security benefits of properly sandboxed evaluation of MVEL.
Allowing users with Analyst role to log in to the Business Central console with JSM disabled is not secure and not recommended.

Chapter 4. Logging on to Business Central

Log into Business Central after the server has successfully started.
  1. Navigate to http://localhost:8080/business-central in a web browser. If the user interface has been configured to run from a domain name, substitute localhost for the domain name. For example http://www.example.com:8080/business-central.
  2. Log in with the user credentials that were created during installation. For example: User = helloworlduser and password = Helloworld@123.

Chapter 5. Hello World project

To demonstrate basic features of Red Hat JBoss BPM Suite, this chapter will instruct you on how to set up the Hello World project with a Hello World business process. All that this business process will do, is display the Hello World! message and finish execution.
You will be instructed to do the following:
  1. Create a Hello World repository in the Artifact repository.
  2. Create the Hello World Project with the HelloWorld business process definition.
  3. Model the Hello World process logic in the business process using the graphical Process Designer tool.
  4. Build and deploy the project on the locally running Execution Engine.
  5. Run the Hello World process.
  6. Monitor the Process execution.

5.1. Creating repository structure

All business assets live in repositories that live in Organizational Units, which are directories in the Artifact repository. By default, the Artifact repository does not contain any organizational units. Therefore to be able to create your own business assets, such as a business process, you need to create an organizational unit in the Artifact repository and a (Git) repository in it. The repository can then contain your Project. A project can contain an arbitrary package structure, which allows you to structure its content into logical "directory" structure. Any package can contain your business assets (for more information on the Artifact repository, refer to the Red Hat JBoss BPMS User Guide).
To create the repository structure, do the following:
  1. Open Business Central in your web browser (if running locally http://localhost:8080/business-central) and log in as a user with the admin role (helloworlduser).
  2. Create an organizational unit in the Artifact repository:
    1. Go to AuthoringAdministration.
    2. On the perspective menu, click Organizational UnitsManage Organizational Units.
    3. In the displayed Organizational Unit Manager view, click Add.
      In the displayed Add New Organizational Unit dialog box, define the unit properties and click OK:
      • Name: helloworld
      • Owner: helloworlduser
  3. Create a new repository in the helloworld organizational unit:
    1. Go to AuthoringAdministration.
    2. On the perspective menu, click RepositoriesNew repository.
    3. In the displayed Create Repository dialog box, define the repository properties:
      • Repository Name: helloworldrepo
      • Organizational Unit: helloworld
  4. Go to AuthoringProject Authoring.
  5. In the Project Explorer in the organizational unit drop-down box, select helloworld, and in the repository drop-down box select helloworldrepo.
    Selecting the helloworldrepo repository in the helloworld organizational group in Project Explorer

    Figure 5.1. Selecting the helloworldrepo repository in the helloworld organizational group in Project Explorer

  6. Create a project in the helloworld repository:
    1. On the perspective menu, go to New ItemProject
    2. In the displayed Create new dialog box, define your Project properties:
      • Resource Name (project name): HelloWorld
      • Path: default://master@helloworldrepo/
    3. In the New Project Wizard dialog, define the maven properties of the Project. Press Enter after making each entry:
      • Group ID: org.bpms
      • Artifact ID: HelloWorld
      • Version ID: 1.0
    4. Click Finish.

Chapter 6. Hello World process

In this chapter, we will continue the Hello World example and create an end to end business process to demonstrate the creation of a basic Hello World Process.

6.1. Creating business process

To create a new Business Process definition, do the following:
  1. Display the Project Authoring perspective (AuthoringProject Authoring).
  2. In the Project Explorer view on the left, select the helloworld organizational unit, the helloworldrepo repository, the HelloWorld project, and the org.bpms package: this defines the location in the Artifact repository, where you will create your Business Process definition.

    Note

    Make sure to select the package org.bpms. Selection of an incorrect package causes the deployment to fail.
  3. On the perspective menu, click New ItemBusiness Process and define the Process definition details:
    • Enter the resource name as HelloWorld.
  4. Click OK.
The Process Designer with the canvas of the created Process definition opens.

6.2. Modeling business process

After you have created the Business Process definition, you can design the business process in the Business Process designer: The Business Process designer should be open in a tab on the right. If you closed the tab, in the Project Explorer, click HelloWorld under Business Processes to re-open the Business Process designer. Make sure you select the correct package (org.bpms.helloworld). To design the Process content, do the following:
  1. Expand the Object Library palette with Process Elements: click the double-arrow button ( ) in the upper left hand corner of the Business Process designer tab.
  2. A Start Event element appears on the canvas.
  3. Click the Start Event element: the quick linker items appear around the node. Click the Task ( ) icon to create an outgoing Sequence Flow and a Task element connected to the Start Event.
  4. Create a Timer Event: from the palette, drag-and-drop the Timer (under Catching Intermediate Events) and connect the Task to the Timer Element using the quick linker menu.
  5. Create the End Event element connected to the Timer Event element (either using the quick linker feature or dragging it from the palette).
Draft of the HelloWorld Process

Figure 6.1. Draft of the HelloWorld Process

6.3. Defining element properties

Now, you need to define the element properties:
  1. Click the double-arrow ( ) in the upper right hand corner to expand the Properties tab.
  2. Click anywhere on the canvas. The Properties tab displays the properties of the HelloWorld Process. The required properties are pre-defined; however, you can change their values if necessary.
  3. The Start Element and End Element have only optional properties. However, Task Elements need their type and then type-specific properties defined: click the Task element and define the required properties:
    • Name: ScriptTask
    • Task Type: Script
    • Script Language: java
    • Script: System.out.println("Hello World!");
      Click OK.
    You have defined a Task that will perform a script on execution. The script is defined in Java and executes the method System.out.println("Hello World!");, that means it will write Hello World! to the standard output of the server (by default, the standard output of the server is the console the server was started in).
  4. You still need to define properties of the Timer Event to make the process wait on runtime, so you can inspect its execution: click the Timer Element and define the time it will wait for execution:
    • Edit Time Duration: 1m and press Enter.
      The Process will therefore wait for 1 minute on the Timer Event after it executes the Script Task.
  5. Give the Timer Event a name via the properties, and then save your Process: open the Save menu ( ) and click Save.
  6. Click the ( ) button on the toolbar of the Process Designer with the Process to make sure the defined Process is valid. The outline of any element with one or multiple validation mistakes turns orange (refer to the Red Hat JBoss BPM Suite User Guide for information on the validation feature).
Further information on Process Elements and their properties is available in the Red Hat JBoss BPM Suite User Guide.

6.4. Building and deploying

Before you can instantiate, that is, run, your Hello World Process, you need to build the entire Project and deploy it to the Execution Server:
  1. On the main menu of Business Central, go to AuthoringProject Authoring.
  2. In the Project Explorer, locate the Hello World project.
  3. Open the Project in the Project editor: on the perspective menu, click ToolsProject Editor.
  4. Check that the correct Project details are displayed on the Project Screen and click the Build & Deploy button in the upper right hand corner of the Project Screen view.
    The Build & Deploy button located in the upper left corner of the editor view

    Figure 6.2. Project editor with the helloWorld project properties

A green notification appears in the upper part of the screen informing you that the project has been built and deployed to the Execution Server and is available for instantiation.

6.5. Instantiating business process

To create an instance of the Hello World process, that is, to run the business process, do the following:
  1. Click Process ManagementProcess Definitions on the main menu.
  2. On the displayed Process Definitions tab, locate the Hello World process. You might need to click the Refresh button to have the deployment displayed on the list.
  3. Click the Start( ) button next to the Process definition entry and in the Form dialog box, click the Start button again to confirm that you want to instantiate the process.
    The Process is instantiated with the currently logged-in user as the process owner and the process form is displayed (the form can serve to request input from a user on Process instantiation if defined; refer to the Red Hat JBoss BPM Suite User Guide).
The Process Instance Details view is displayed with details about the started Process instance. The Hello World! message appears in standard output, typically the terminal emulator in which the server was started. Then the Process instance waits on the Timer Event. Click on Options - Process Model to see the current execution status.
HelloWorld realtime execution diagram: the Timer Event being executed

Figure 6.3. HelloWorld realtime execution diagram: the Timer Event being executed

6.6. Aborting business process

At the moment, an instance of the HelloWorld Process is running on the Execution Server (being executed). You can check in the Process Instances view: to display the view, go to Process ManagementProcess Instances.
From here you can view the details of any process instance using the details ( ) button and perform basic administration actions, such as, send a Signal to a Process instance ( ) and abort it ( ).
Since, the HelloWorld Process instance is waiting on the Timer Event, abort it: click the ( ) on the line with the information on the HelloWorld Process instance: the instance will disappear from the list of active Process instances and appear in the list of Aborted instances.
Description

Figure 6.4. Aborted Process instances including the HelloWorld Process instance

Chapter 7. Hello World business rule

Since BPMS comes with BRMS integrated, this chapter provides an introduction to how business rules work and integrate into BPMS.
You will add a new Task, a Business Rule Task, to the HelloWorld process, which will fire (check) a business rule of a particular business rule group.
Note that this is a very simple integration case and in production you might need to use a more advanced concept and techniques, such as decision tables. For more information on business rules and BRMS refer to the Red Hat JBoss BRMS User Guide

7.1. Creating the business rule

Business rules are defined as when-then statements: when something is true, then something happens (for example, when the person is older than 18, they can access the particular content). Business rules are stored in DRL files.
To define the helloworldrule business rule in the HelloWorld project, do the following:
  1. In Project Explorer, select the helloworld organizational unit, the helloworldrepo repository, the HelloWorld project, and the default package.

    Note

    Make sure to select the default package. Selection of an incorrect package causes the deployment to fail.
  2. Create the DRL file:
    1. On the perspective menu, click New ItemDRL file.
    2. In the Create new dialog box, define the resource name as helloworldrule and check that the destination path is default://master@helloworldrepo/HelloWorld/src/main/resources.
    3. Click OK.
  3. In the displayed DRL editor with the helloworldrule.drl file, define the rule:
    rule "helloworldrule"
    ruleflow-group "helloworldgroup"
    when 
    then
    	System.out.println("Hello World!");
    end
    
    This rule does not define any when condition, that is, it will always be true when fired (called to execute) and the Hello World! phrase will be printed.
  4. Click Save.
  5. A Save this item prompt is displayed. Enter the Check-in comment and click Save.

    Note

    The check-in comment would be a short description of the kind of change you made and has to be entered every time an asset is saved.

7.2. Adding the Business Rule Task

A Business Rule Task is a task which fires rules that belong to a certain ruleflow group.
To add a Business Rule Task to your process, do the following:
  1. Open your Business Process in Process Designer: in Project Explorer, select the HelloWorld project, the org.bpms package, click on BUSINESS PROCESSES and click the HelloWorld process.

    Note

    Make sure to select the org.bpms package. Selection of an incorrect package causes the deployment to fail.
  2. In the displayed Business Process designer with the helloworld process, expand the Object Library palette with Process Elements: click the double-arrow button ( ) in the upper left hand corner of the Business Process designer tab.
  3. Expand the Tasks menu and drag-and-drop the Business Rule task to the canvas on the right.
    Adjust flow connections so as to integrate the task into the workflow.
  4. Select the Business Rule Task and define its properties in the Properties panel:
    • Name: BusinessRule
    • Ruleflow Group: helloworldgroup
      The Ruleflow Group property defines the group of rules that should be fired when the Task is being executed. In this example, only one rule, the helloworldrule rule defined in the helloworldrule.drl file, is present in the helloworldgroup group.
    The helloworld process with the Business Rule Task and its properties

    Figure 7.1. The helloworld process with the Business Rule Task and its properties

  5. Click the save button to save the changes.

7.3. Building and deploying

Build the entire Project and deploy it to the Execution Server:
  1. On the main menu of Business Central, go to AuthoringProject Authoring.
  2. In the Project Explorer, locate the Hello World project.
  3. Open the Project in the Project editor: on the perspective menu, click ToolsProject Editor.
  4. Check that the correct Project details are displayed on the Project Screen and click the Build & Deploy button in the upper right hand corner of the Project Screen view.
    The Build & Deploy button located in the upper left corner of the editor view

    Figure 7.2. Project editor with the helloWorld project properties

A green notification appears in the upper part of the screen informing you that the project has been built and deployed to the Execution Server and is available for instantiation. Note that the previous version of the helloWorld deployment is substituted with the new version with the Business Rule Task. To keep both deployments, change the version number of the Project in the Project editor.

7.4. Instantiating business process

To create an instance of the Hello World process, that is, to run the business process, do the following:
  1. Click Process ManagementProcess Definitions on the main menu.
  2. On the displayed Process Definitions tab, locate the Hello World. You might need to click Refresh to have the deployment displayed on the list.
  3. Click the Start( ) button next to the Process definition entry and in the Form dialog box, click the play ( ) button to confirm that you want to instantiate the process.
    The Process is instantiated with the currently logged-in user as the process owner and the process form is displayed (the form can serve to request input from a user on Process instantiation if defined; refer to the Red Hat JBoss BPMS User Guide).
The Process Instance Details view is displayed with details about the started Process instance. The Hello World! message appears in standard output twice, typically the terminal emulator in which the server was started. Then the Process instance waits on the Timer Event. Click on the Views - Process Model to see the current execution status.
HelloWorld realtime execution diagram: the Timer Event being executed

Figure 7.3. HelloWorld realtime execution diagram: the Timer Event being executed

Chapter 8. BAM

8.1. Accessing Red Hat JBoss BPM Suite Dashbuilder

Dashbuilder is the Red Hat JBoss BPM Suite web-based user interface for Business Activity Monitoring. To access the Dashbuilder from Business Central, go to DashboardsProcess & Task Dashboards.
The displayed dashboard provides statistics on runtime data selected on the left. You can create your own dashboard in the Dashbuilder. To do so, display the Dashbuilder by clicking DashboardsBusiness Dashboards.

8.2. Monitoring instances

The Dashbuilder provides a special dashboard that allows you to monitor the status of runtime data (Process instances and Tasks) on your Execution Engine.
To view this data, go to DashboardsProcess & Task Dashboard.
Process and Task dashboard

Figure 8.1. Process and Task dashboard

On the left panel, you can select an entity to display the statistics for. The charts and data on the right is then updated accordingly.

Chapter 9. Red Hat JBoss Developer Studio

Red Hat JBoss Developer Studio is the JBoss integrated development environment (IDE) based on Eclipse and available from the Red Hat customer support portal at https://access.redhat.com. JBoss Developer Studio provides plug-ins with tools and interfaces for Red Hat JBoss BRMS and Red Hat JBoss BPM Suite. These plugins are based on the community version of these products. So, the BRMS plugin is called the Drools plugin and the BPM Suite plugin is called the jBPM plugin.
Refer to the Red Hat JBoss Developer Studio documentation for installation and set-up instructions.

9.1. JBoss Central

When JBoss Developer Studio 7.0 is first started, JBoss Central is displayed in the main window of the workbench. From JBoss Central it is possible to create new projects by selecting the menu options under Start from scratch. Example projects can be started by selecting the links under Start from a sample.

Note

Due to issues in GWT3, JBDS should be configured to not use it. You can do this by setting the system property to 0:
# Don't use GTK 3 
export SWT_GTK3=0
JBoss Central

Figure 9.1. JBoss Central

9.2. Installing the JBoss Developer Studio Plug-ins

The Drools and jBPM plug-ins for JBoss Developer Studio are available via the update site.

Procedure 9.1. Install the Drools and jBPM JBoss Developer Studio Plug-in

  1. Start JBoss Developer Studio.
  2. Select HelpInstall New Software.
  3. Click Add to enter the Add Repository menu.
  4. Give the software site a name next to Name field and add the following url in the Location field: https://devstudio.jboss.com/updates/7.0/integration-stack/
  5. Click OK
  6. Select the JBoss Business Process and Rule Development feature from the available options and click Next and then Next again.
  7. Read the license and accept it by selecting the appropriate radio button, and click Finish.
  8. After installation of the plug-ins has completed, restart JBoss Developer Studio.

9.3. Setting the Drools runtime

In order to use the JBoss BRMS plug-in with Red Hat JBoss Developer Studio, it is necessary to set up the runtime.
A runtime is a collection of jar files that represent a specific release of the software and provides libraries needed for compilation and running of your business assets.

Procedure 9.2. Configure BRMS Runtime

  1. Extract the runtime jar files located in the jboss-brms-engine.zip archive of the JBoss BRMS Generic Deployable zip archive (not the EAP6 deployable zip archive) available from Red Hat Customer Portal.
  2. From the JBoss Developer Studio menu, select Window and click Preferences.
  3. Select DroolsInstalled Drools Runtimes.
  4. Click Add...; provide a name for the new runtime, and click Browse to navigate to the directory where you extracted the runtime files in step 1. Click OK to register the selected runtime in JBDS.
  5. Mark the runtime you have created as the default Drools runtime by clicking on the check box next to it.
  6. Click OK. If you have existing projects, a dialog box will indicate that you have to restart JBoss Developer Studio to update the Runtime.

9.4. Setting the jBPM runtime

In order to use the jBPM plug-in with Red Hat JBoss Developer Studio, it is necessary to set up the runtime.
A runtime is a collection of jar files that represent a specific release of the software.
If you have previously downloaded the JBoss BPM Suite Generic Deployable zip archive from Red Hat Customer Portal, the jar files that make up the runtime are located in the jboss-bpms-engine.zip archive.

Procedure 9.3. Configure jBPM Runtime

  1. From the JBoss Developer Studio menu, select Window and click Preferences.
  2. Select jBPMInstalled jBPM Runtimes.
  3. Click Add...; provide a name for the new runtime, and click Browse to navigate to the directory where the runtime is located.
  4. Click OK, select the new runtime and click OK again. If you have existing projects, a dialog box will indicate that you have to restart JBoss Developer Studio to update the Runtime.

9.5. Configuring the JBoss BPM Suite Server

JBoss Developer Studio can be configured to run the Red Hat JBoss BPM Suite Server.

Procedure 9.4. Configure the Server

  1. Open the jBPM view by selecting WindowOpen PerspectiveOther and select jBPM and click OK.
  2. Add the server view by selecting WindowShow ViewOther... and select ServerServers.
  3. Open the server menu by right clicking the Servers panel and select NewServer.
  4. Define the server by selecting JBoss Enterprise MiddlewareJBoss Enterprise Application Platform 6.1+ and clicking Next.
  5. Set the home directory by clicking the Browse button. Navigate to and select the installation directory for JBoss EAP 6.1.1 which has JBoss BPM Suite installed.
  6. Provide a name for the server in the Name field, make sure that the configuration file is set, and click Finish.

9.6. Importing Projects from a Git Repository into JBoss Developer Studio

JBoss Developer Studio can be configured to connect to a central Git asset repository. The repository is the space where versions of rules, models, functions and processes are stored. This Git repository must already be defined by the KIE Workbench.
Users can either clone a remote Git repository or import a local Git repository.

Procedure 9.5. Cloning a Remote Git Repository

  1. Start the Red Hat JBoss BPM Suite server (if not already running) by selecting the server from the server tab and click the start icon.
  2. Simultaneously, start the Secure Shell server, if not running already, by using the following command. The command is Linux and Mac specific only. On these platforms, if sshd has already been started, this command will fail and you may safely ignore this step.
    /sbin/service sshd start
  3. In JBoss Developer Studio, select FileImport... and navigate to the Git folder. Open the Git folder to select Projects from Git and click Next.
  4. Select the repository source as Clone URI and click Next.
  5. Enter the details of the Git repository in the next window and click Next.
    Git Repository Details

    Figure 9.2. Git Repository Details

  6. Select which branch you want to import in the following window and click Next.
  7. You will be presented with the option to define the local storage for this project. Enter (or select) a non-empty directory, make any configuration changes and click Next.
  8. Import the project as a general project in the following window and click Next. Name the project and click Finish.

Procedure 9.6. Importing a Local Git Repository

  1. Start the Red Hat JBoss BPM Suite server (if not already running) by selecting the server from the server tab and click the start icon.
  2. In JBoss Developer Studio, select FileImport... and navigate to the Git folder. Open the Git folder to select Projects from Git and click Next.
  3. Select the repository source as Existing local repository and click Next.
    Git Repository Details

    Figure 9.3. Git Repository Details

  4. Select the repository that is to be configured from the list of available repositories and click Next.
  5. In the dialog that opens, select the radio button Import as general project from the Wizard for project import group and click Next. Name the project and click Finish.
    Wizard for Project Import

    Figure 9.4. Wizard for Project Import

9.7. Creating a Drools Project

Procedure 9.7. Creating a New Red Hat JBoss Developer Studio Project

  1. From the main menu, select FileNewProject.
    Select DroolsDrools Project and click Next.
  2. Enter a name for the project into the Project name: text box and click Next.

    Note

    JBoss Developer Studio provides the option to add a sample HelloWorld Rule file to the project. Accept this default by clicking Next to test the sample project in the following steps.
  3. Select the Drools runtime (or use the default).
  4. Select code compatible with Drools 6.0.x. Enter a GroupID, an ArtifactID, and Version, and click Finish.
  5. To test the project, right click the Java file that contains the main method and select Runrun asJava Application.
    The output will be displayed on the console tab.

9.8. Creating a jBPM project

Procedure 9.8. Creating a New Red Hat JBoss Developer Studio Project

  1. From the main menu, select FileNewProject.
    Select jBPMjBPM Project and click Next.
  2. Enter a name for the project into the Project name: text box and click Next.

    Note

    JBoss Developer Studio provides the option to add a sample HelloWorld Rule file to the project. Accept this default by clicking Next to test the sample project in the following steps.
  3. Select the jBPM runtime (or use the default).
  4. Select generate code compatible with jBPM 6 or above, and click Finish.
  5. To test the project, right click the Java file that contains the main method and select Runrun asJava Application.
    The output will be displayed in the console tab.

Chapter 10. Business Resource Planner

Business Resource Planner is available as a technical preview with Red Hat JBoss BPM Suite. Business Resource Planner is a lightweight, embeddable planning engine that optimizes planning problems. It helps normal Java TM programmers solve planning problems efficiently, and it combines optimization heuristics and metaheuristics with very efficient score calculations.
Planner helps solve various use cases like the following:
  • Employee/Patient Rosters. Planner helps create timetables for nurses and keeps track of patient bed management.
  • Educational Timetables. Planner helps schedule lessons, courses, exams, and conference presentations.
  • Shop Schedules: Planner tracks car assembly lines, machine queue planning, and workforce task planning.
  • Cutting Stock: Planner minimizes waste by reducing the consumption of resources such as paper and steel.

10.1. Installing Business Resource Planner

  1. Navigate to the Red Hat Customer Portal and log in with your user credentials.
  2. Select DownloadsProduct Downloads.
  3. In the Product Downloads page that opens, click Red Hat JBoss BPM Suite.
  4. From the Version drop-down menu, select version 6.0.3.
  5. Select Red Hat JBoss BPM Suite 6.0.3 Business Resource Planner and then click Download.

10.2. Running the Business Resource Planner Examples

  1. On the command line, move into the examples/ directory.
  2. In a Unix environment, run the following command:
    ./runExamples.sh
    In a Windows environment, run the following command:
    ./runExamples.bat
  3. Pick an example from the Examples GUI application that opens and run it in your favorite IDE.

Appendix A. Revision History

Revision History
Revision 1.0.0-35Mon Dec 01 2014Vikram Goyal
Built from Content Specification: 22690, Revision: 729898 by vigoyal

Legal Notice

Copyright © 2014 Red Hat, Inc.
This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.