Professional Documents
Culture Documents
Jboss Enterprise Brms Platform 5: Brms Getting Started Guide
Jboss Enterprise Brms Platform 5: Brms Getting Started Guide
Edition 5.3.1
Legal Notice
Copyright © 2012 Red Hat, Inc.
T he text of and illustrations in this document are licensed by Red Hat under a Creative Commons
Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at
http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this
document or an adaptation of it, you must provide the URL for the original version.
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, MetaMatrix, 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 T orvalds in the United States and other countries.
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.
Abstract
T his guide provides the steps necessary for administrators to install JBoss Enterprise Business Rules
Management System Platform, the plug-ins for JBoss Developer Studio, and provides instructions for
running example projects.
4 Table of Contents
Table of Contents
Preface
1. Document Conventions
1.1. T ypographic Conventions
1.2. Pull-quote Conventions
1.3. Notes and Warnings
1. Introduction
1.1. JBoss Enterprise Business Rules Management System Platform
2. Installation
2.1. Installation Options
2.2. Installing the Standalone Package
2.3. Installing the Deployable Package
2.4. Configuring Authentication
2.5. Adding Users
2.6. Password Configuration for JAAS
2.7. Configuring Business Process Management
2.8. Starting the Server
2.9. Clustering the Business Central Console
2.10. Logging On
3. User Authorization
3.1. Enabling Role-Based Authorization
A. Revision History
JBoss Enterprise BRMS Platform 5 BRMS Getting Started Guide 5
Preface
1. Document Conventions
T his manual uses several conventions to highlight certain words and phrases and draw attention to
specific pieces of information.
In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts set. T he
Liberation Fonts set is also used in HT ML editions if the set is installed on your system. If not, alternative
but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later includes the
Liberation Fonts set by default.
Four typographic conventions are used to call attention to specific words and phrases. T hese
conventions, and the circumstances they apply to, are as follows.
Mono-spaced Bold
Used to highlight system input, including shell commands, file names and paths. Also used to highlight
keys and key combinations. For example:
T he above includes a file name, a shell command and a key, all presented in mono-spaced bold and all
distinguishable thanks to context.
Key combinations can be distinguished from an individual key by the plus sign that connects each part of
a key combination. For example:
T he first example highlights a particular key to press. T he second example highlights a key combination:
a set of three keys pressed simultaneously.
If source code is discussed, class names, methods, functions, variable names and returned values
mentioned within a paragraph will be presented as above, in m ono-spaced bold. For example:
File-related classes include filesystem for file systems, file for files, and dir for
directories. Each class has its own associated set of permissions.
Proportional Bold
T his denotes words or phrases encountered on a system, including application names; dialog box text;
labeled buttons; check-box and radio button labels; menu titles and sub-menu titles. For example:
Choose System → Preferences → Mouse from the main menu bar to launch Mouse
Preferences. In the Buttons tab, click the Left-handed m ouse check box and click
Close to switch the primary mouse button from the left to the right (making the mouse
suitable for use in the left hand).
Character Map menu bar, type the name of the character in the Search field and click
Next. T he character you sought will be highlighted in the Character T able. Double-click
this highlighted character to place it in the T ext to copy field and then click the Copy
button. Now switch back to your document and choose Edit → Paste from the gedit menu
bar.
T he above text includes application names; system-wide menu names and items; application-specific
menu names; and buttons and text found within a GUI interface, all presented in proportional bold and all
distinguishable by context.
Whether mono-spaced bold or proportional bold, the addition of italics indicates replaceable or variable
text. Italics denotes text you do not input literally or displayed text that changes depending on
circumstance. For example:
T o connect to a remote machine using ssh, type ssh username@ domain.name at a shell
prompt. If the remote machine is exam ple.com and your username on that machine is
john, type ssh john@ exam ple.com .
T he m ount -o rem ount file-system command remounts the named file system. For
example, to remount the /hom e file system, the command is m ount -o rem ount /hom e.
T o see the version of a currently installed package, use the rpm -q package command. It
will return a result as follows: package-version-release.
Note the words in bold italics above — username, domain.name, file-system, package, version and
release. Each word is a placeholder, either for text you enter when issuing a command or for text
displayed by the system.
Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and
important term. For example:
T erminal output and source code listings are set off visually from the surrounding text.
Source-code listings are also set in m ono-spaced rom an but add syntax highlighting as follows:
JBoss Enterprise BRMS Platform 5 BRMS Getting Started Guide 7
package org.jboss.book.jca.ex1;
import javax.naming.InitialContext;
System.out.println("Created Echo");
Finally, we use three visual styles to draw attention to information that might otherwise be overlooked.
Note
Notes are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note should
have no negative consequences, but you might miss out on a trick that makes your life easier.
Important
Important boxes detail things that are easily missed: configuration changes that only apply to the
current session, or services that need restarting before an update will apply. Ignoring a box
labeled 'Important' will not cause data loss but may cause irritation and frustration.
Warning
Warnings should not be ignored. Ignoring warnings will most likely cause data loss.
If you experience difficulty with a procedure described in this documentation, visit the Red Hat Customer
Portal at http://access.redhat.com. T hrough the customer portal, you can:
search or browse through a knowledgebase of technical support articles about Red Hat products.
submit a support case to Red Hat Global Support Services (GSS).
access other product documentation.
Red Hat also hosts a large number of electronic mailing lists for discussion of Red Hat software and
8 Preface
technology. You can find a list of publicly available mailing lists at https://www.redhat.com/mailman/listinfo.
Click on the name of any mailing list to subscribe to that list or to access the list archives.
If you find a typographical error, or know how this guide can be improved, we would love to hear from
you. Submit a report in Bugzilla against the product JBoss Enterprise BRMS Platform 5 and the
component Docum entation. T he following link will take you to a pre-filled bug report for this product:
https://bugzilla.redhat.com/.
Fill out the following template in Bugzilla's Description field. Be as specific as possible when
describing the issue; this will help ensure that we can fix it quickly.
Document URL:
Additional information:
Be sure to give us your name so that you can receive full credit for reporting the issue.
JBoss Enterprise BRMS Platform 5 BRMS Getting Started Guide 9
Chapter 1. Introduction
JBoss Enterprise BRMS Platform is supported on a variety of operating systems, Java Virtual Machines
(JVMs), and database configurations. A full list of certified and compatible configurations can be found at
http://www.redhat.com/resourcelibrary/articles/jboss-enterprise-brms-supported-configurations.
Report a bug
10 Chapter 2. Installation
Chapter 2. Installation
Report a bug
T he following procedure details how to install the JBoss Enterprise BRMS Platform 5.3 standalone
package.
1. Download the standalone package zip file from the Red Hat Customer Support Portal at
https://access.redhat.com. Select Downloads → Download your software → BRMS Platform,
then select the version. T he current version is 5.3.0, these instructions use the package names
for 5.3.0 but also apply to earlier versions except where noted.
2. Extract the contents of the standalone zip archive to install the server. T his creates the brm s-
standalone-5.3.0 directory which includes an installation of JBoss Enterprise Application
Platform with JBoss Enterprise BRMS Platform deployed.
Note
JBoss Enterprise BRMS Platform 5.3.0 is deployed to either the default or production
profiles. T his guide uses the default profile.
3. Enable Users. T he default configuration uses the BRMS JAAS application profile. T his profile
stores user names and passwords in the brm s-standalone-5.3.0/jboss-
as/server/default/conf/props/brm s-users.properties file.
Users are added by adding entries to this file in the format username=password. Entries can be
commented out by adding a hash character (#) to the beginning of the line.
#admin=password
jsmith=s@r@hSm1th
tandrews=pp3rrss0nn3ll
Refer to the BRMS Administration Guide for information about changing the JAAS profile to one
that supports a different authentication system, such as LDAP.
4. T he default configurations use embedded databases that are not suitable or supported for
production environments. Before deploying into a production environment this configuration must
be changed to a supported database. Please refer to the BRMS Administration Guide for
database configuration instructions.
5. Start the server from the command line with the run.sh command on a UNIX or Linux system, or
JBoss Enterprise BRMS Platform 5 BRMS Getting Started Guide 11
Report a bug
1. Download the deployable package zip file from the Red Hat Customer Support Portal at
https://access.redhat.com.
Select Downloads → Download your software → BRMS Platform, and then select the
version and choose the deployable package.
Users installing to JBoss Enterprise Application Platform 6 should download the package that
includes EE6 as part of the filename. All other users should download the package that does not
include EE6 as part of the filename.
2. Extracting the downloaded archive creates the following zip archives:
jboss-brm s-engine.zip
jboss-brm s-m anager.zip
jboss-jbpm -console.zip
jboss-jbpm -engine.zip
m odeshape.zip
Modeshape is a Java Content Repository (JCR) that is included in JBoss Enterprise BRMS 5.3.1
as a technical preview; see the BRMS Administration Guide for further details.
3. Extract jboss-brm s.war from the jboss-brm s-m anager.zip archive and copy to the
application server's deploy directory.
T he deploy directories are as follow:
JBoss Enterprise Application Platform 5.x:
jboss-as/server/profile/deploy/
JBoss Enterprise Application Platform 6.0:
jboss-eap-6.0/standalone/deploym ents/
JBoss Enterprise SOA Platform:
jboss-esb/server/profile/deploy/
JBoss Enterprise Web Server 1:
tom cat6/webapps/
12 Chapter 2. Installation
Note
Both JBoss Enterprise Application Platform 5.x and JBoss Enterprise SOA Platform include
a netty.jar file; however, JBoss Enterprise BRMS requires the specific version of netty.jar
that is included with the JBoss Enterprise BRMS download.
JBoss Enterprise Application Platform 6 users do not need to extract netty.jar from the jboss-
jbpm -engine.zip directory. Instead, edit the jboss-eap-
6.0/standalone/configuration/standalone.xm l file so that the application server will
load the required netty library.
Update the "urn:jboss:dom ain:ee:1.1" subsystem property to match the following code
snippet:
JBoss Enterprise BRMS Platform 5 BRMS Getting Started Guide 13
<subsystem xmlns="urn:jboss:domain:ee:1.1">
<global-modules>
<module name="org.jboss.netty" slot="main"/>
</global-modules>
<spec-descriptor-property-replacement>false</spec-descriptor-property-
replacement>
<jboss-descriptor-property-replacement>true</jboss-descriptor-property-
replacement>
</subsystem>
8. When deploying to JBoss Enterprise Web Server, copy the antlr, com m on-collections,
dom 4 j, javassist, jta, hibernate, log4 j, and slf4 j jar files from the jboss-jbpm -
engine/lib/ directory to the application server's lib directory.
JBoss Enterprise Web Server 1:
tom cat6/lib/
JBoss Enterprise Web Server 2:
tom cat7/lib/
9. T he default configurations use embedded databases that are not suitable or supported for
production environments. Before deploying into a production environment, this configuration must
be changed to a supported database. Please refer to the BRMS Administration Guide for
database configuration instructions.
Report a bug
JBoss Enterprise Application Platform 5.x and JBoss Enterprise SOA Platform
When deploying to JBoss Enterprise Application Platform 5.x or JBoss Enterprise SOA Platform, add the
login module policy to server/profile/login-config.xm l. T he
org.jboss.security.auth.spi.UsersRolesLoginModule in the example below is provided as
an example only.
<application-policy name="brms">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag="required">
<module-option name="usersProperties">props/brms-
users.properties</module-option>
<module-option name="rolesProperties">props/brms-
roles.properties</module-option>
</login-module>
</authentication>
</application-policy>
When deploying to JBoss Enterprise Application Platform 6, edit the jaas-config-nam e property in
jboss-eap-6.0/standalone/deploym ents/jboss-brm s.war/WEB-INF/com ponents.xm l to
14 Chapter 2. Installation
brm s:
When deploying to JBoss Enterprise Web Server, create a jaas.config file, and add the login module
policy. T he org.jboss.security.auth.spi.UsersRolesLoginModule in the example below is
provided as an example only.
brms {
org.jboss.security.auth.spi.UsersRolesLoginModule required debug=true;
};
Note
When using the above example for evaluation purposes, it is necessary to copy the
jbosssx.jar from the JBoss Enterprise standalone download. Copy the jbosssx.jar file from
the standalone download jboss-as/lib/ to the tom cat6/lib/ directory.
Open the tom cat/6/bin/catalina.sh file and search for the following line:
Report a bug
username=password
username=JBossAdmin,httpInvoker,user,admin
JBoss Enterprise Application Platform and JBoss Enterprise SOA Platform use the brm s-
JBoss Enterprise BRMS Platform 5 BRMS Getting Started Guide 15
users.properties file for usernames and passwords and brm s-roles.properties to define
roles.
Jboss Enterprise Web Server uses the users.properties file for usernames and passwords and
roles.properties to define roles. JBoss Enterprise Web Server users must also add the username,
passwords, and roles to the tom cat6/conf/tom cat-users.xm l file:
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="user"/>
Note
Users who are given permission to access the business central console must have one of the
following roles: administrator, manager, or user.
JBoss Enterprise Application Platform 6 users must update the security domain to include references to
brm s-users.properties and brm s-roles.properties by editing the jboss-eap-
6.0/standalone/configuration/standalone.xm l by adding the following XML:
Report a bug
16 Chapter 2. Installation
If the additional users are added to the brm s-users.properties file, they also need to be
synchronized for the Process Designer and Business Central Console.
1. Process Designer: T o edit the usernames and passwords for the Process Designer, which is a
separate application integrated with JBoss Enterprise BRMS, open the
designer.war/profiles/jbpm .xm l file and edit the usr and pwd properties:
usr="admin" pwd="admin"
2. Business Central Console. T o edit the usernames and passwords for the Business Central
Console, open the business-central-server.war/WEB-
INF/classes/jbpm .console.properties file and edit the guvnor.usr and guvnor.pwd
properties:
guvnor.usr=admin
guvnor.pwd=admin
Report a bug
1. Configure the human task server by editing web.xm l, which is located in jbpm -hum an-
task.war/WEB-INF/. T he human task server defaults to HornetQ. web.xm l is annotated with
instructions. If further information is required, please refer to the Human T asks chapter of the
JBoss BRMS Business Process Management Guide.
2. Configure the Business Central Console by editing the jbpm .console.properties file, which
is located in the business-central-server.war/WEB-INF/classes/ directory. T his
jbpm .console.properties file allows users to configure the console host and port number,
task server connectivity, and repository connectivity. Refer to the Business Central Console
chapter of the JBoss BRMS Business Process Management Guide for further details.
3. Configure the process designer by editing the jbpm .xm l file, which is located in the
designer.war/profiles/ directory. T he jbpm .xm l file allows users to set the host and port
number, username and password. Refer to the Process Designer chapter of the JBoss BRMS
Business Process Management Guide for further details.
Report a bug
When installing to JBoss Enterprise Application Platform 6, start the server by running the
standalone.sh command.
When installing to JBoss Enterprise Web server or Apache T omcat, start the server by running the
startup.sh command on a UNIX or Linux system or startup.bat command on a Microsoft Windows
system.
After successfully starting, a message is displayed on the command line reporting how long it took the
server to start.
Report a bug
T he JBoss BRMS rule engine, repository, user interface, and process designer are installed on one
host, and instances of the business central console and the process engine are installed on one or
more other hosts.
1. Download the JBoss BRMS standalone package file from the Red Hat Customer Support Portal at
https://access.redhat.com. Select Downloads → Download your software → BRMS Platform
and then select the version.
2. Copy the downloaded archive onto the host where the JBoss BRMS engine, user interface,
repository, and process designer will be installed. Extract the contents of the standalone zip
archive to install the server. T his creates the brm s-standalone-5.3.1 directory which
includes an installation of JBoss Enterprise Application Platform with JBoss Enterprise BRMS
Platform deployed.
3. Remove the following directories: jbpm -console.war, business-central-server.war, and
jbpm -hum an-task.war from jboss-as/server/default/deploy/ as they will be deployed
on other hosts. If the production profile is being used, remove the directories from jboss-
as/server/production/deploy/.
4. Edit the preferences.properties file located in jboss-brm s.war/WEB-INF/classes/ by
replacing the word localhost with the host's IP address for both the designer.url and
guvnor.url properties.
5. Edit the jbpm .xm l file located in designer.war/profiles by replacing the word localhost
with the host's IP address for the externalloadurl property.
6. Copy the downloaded JBoss BRMS standalone archive onto the hosts where the Business
Central Console and engine will be installed. Extract the contents of the standalone zip archive.
7. Remove the following directories jboss-brm s.war and designer.war from jboss-
as/server/default/deploy/ as they have already been installed on the first host and are
not required. If the production profile is being used, remove the directories from jboss-
as/server/production/deploy/.
18 Chapter 2. Installation
<jta-data-source>java:/myDataSource</jta-data-source>
<property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
11. Start each of the nodes in the cluster with the following command, remembering to provide the
partition name, UDP multicast address address, and host IP address:
Report a bug
2.10. Logging On
Log into the JBoss BRMS web user interface and Business Central Console after the server has
successfully started.
Report a bug
JBoss Enterprise BRMS Platform 5 BRMS Getting Started Guide 19
1. Before enabling role-based authorization, it is necessary to assign one trusted user the admin
role.
a. From the JBoss Enterprise BRMS web user interface navigation panel, select
Administration → User Permissions.
b. Click Create new user m apping and enter the name of the user to be granted Admin
permissions. Note, this user must already exist in the brm s-users.properties file.
c. Click Open next to the username whose permissions are being changed.
d. Click the plus icon to add permissions, and select adm in, click OK, and click Save
changes.
After the system has saved the changes Yes will be displayed under Adm inistrator.
2. Shut down the application server before making these changes.
3. Open the jboss-as/server/production/deploy/jboss-brm s.war/WEB-
INF/com ponents.xm l file in a text editor.
4. In the default com ponents.xm l file, locate the following code and replace false with true:
<component name="org.jboss.seam.security.roleBasedPermissionResolver">
<property name="enableRoleBasedAuthorization">false</property>
</component>
NOTE
In versions 5.1 and earlier, locate and edit the following XML replacing false with true:
<security:role-based-permission-resolver enable-role-based-
authorization="false"/<
NOTE
Report a bug
20 Chapter 4. JBoss D eveloper Studio
Please refer to the JBoss Developer Studio 5.0 Getting Started Guide for installation instructions.
Report a bug
Procedure 4 .1. Install the Drools and jBPM JBoss Developer Studio Plug-in
5. Review the installation details and click Next and then Next again.
6. Read the license and accept it by selecting the appropriate radio button, and click Finished.
7. After installation of the plug-ins has completed, restart JBoss Developer Studio.
Report a bug
A runtime is a collection of jar files that represent a specific release of the software.
Report a bug
1. Open the Drools view by selecting Window → Open Perspective → Other and select Drools
and click OK.
2. Add the server view by selecting Window → Show View → Other... and select Server →
Servers.
3. Open the server menu by right clicking the Servers panel and select New → Server.
4. Define the server by selecting JBoss Enterprise Middleware → JBoss Enterprise
Application Platform 5.x.
5. Set the home directory by clicking the Add... link next to Server runtim e environm ent.
Provide a name for the server in the Nam e field.
22 Chapter 4. JBoss D eveloper Studio
Click Browse to set the Hom e Directory; navigate to the BRMS installation and select the
jboss-as directory.
Select the server profile Production from the configuration options and click Finish and then
Finish again.
Report a bug
Drools
Guvnor Repository Exploring
jBPM
T o open a perspective select Window → Open Perspective → Other and select the required
perspective.
Report a bug
1. Start the JBoss BRMS server by selecting the server from the server tab and click the start icon.
2. Open the Guvnor repository by selecting Window → Show View → Other.
Select Guvnor → Guvnor Repository and click OK.
3. Add the Guvnor connection by selecting Add a Guvnor repository connection icon from
the Guvnor Repository view.
4. Confirm the repository details displayed are correct.
Enter the Guvnor username and password and click Finish.
Guvnor Preferences
T he JBoss Developer Studio preferences for the Guvnor plug-ins allows user to choose whether or not
to save authentication information when connecting to a Guvnor repository, and it allows users to define
a Guvnor URL template for creating new connections.
T he Guvnor preferences are set by accessing the preferences menu. Select Window → Preferences
→ Guvnor to access the preferences.
Report a bug
Use the Resources from Guvnor wizard to copy files from the Guvnor repository to the local
workspace.
When local copies of Guvnor repository files are created, JBoss Developer Studio sets an association
between the local copy and the master file in the repository. T his information is kept in the (normally)
hidden .guvnorinfo folder in the local project and, like all metadata, should not be changed by end users.
T he association allows for operations such as update and commit in synchronization with the master
copy held in the Guvnor repository.
T he following actions can be performed though the Guvnor context menus in JBoss Developer Studio:
Update Action:
T he Update action is available for one or more Guvnor resources that are not synchronized
with the Guvnor repository master copies. T hese files would be out of synchronization due to
one or both of the following conditions:
Performing the Update action replaces the contents of the local file with the contents of the
associated master copies in the Guvnor repository.
Add Action:
T he Add action adds a local file that is not associated with a Guvnor repository master copy to
the Guvnor repository.
Commit Action:
T he Commit action is enabled for one or more Guvnor repository associated files that have
local changes. T he Commit action will write the local changes back to the associated Guvnor
repository files and update the association for the new revision.
If a local change is based on an older revision of a file than is currently in the Guvnor repository
(for example, someone else changed the same file), then the Commit action will ask whether
you wish to overwrite the current version in the Guvnor repository with the local content. When
such conflicts occur, you should use the Eclipse Guvnor version tools, along with Eclipse
standard tools, to determine the differences and merge content based on the current version in
the Guvnor repository.
T he Compare With Version action opens a wizard that allows versions of a file to be compared
for changes.
T he Switch to Version action replaces the current version of a file with the selected version
from the revision history.
Delete Action:
T he Delete action removes the files in the Guvnor repository and deletes local metadata for the
Guvnor repository association.
Disconnect Action:
T he Disconnect action is enabled for one or more Guvnor repository associated files, and it
removes local metadata for the Guvnor repository association.
Guvnor Preferences
T he JBoss Developer Studio preferences for the Guvnor plug-ins allows user to set decoration
preferences for local Guvnor resources to identify changes to local files.
T he Guvnor preferences are set by accessing the preferences menu. Select Window → Preferences
→ Guvnor to access the preferences.
Report a bug
JBoss Enterprise BRMS Platform 5 BRMS Getting Started Guide 25
T he new package can be seen under Knowledge Bases by expanding the packages menu.
Report a bug
Report a bug
NOTE
JBDS provides the option to add a sample HelloWorld Process to the project. Accept this
default to test the sample project in the next step.
3. T o test the project, right click the Java file that contains the main method and select Run → run
as → Java Application.
T he output will be displayed in the console tab.
Report a bug
NOTE
JBDS provides the option to add a sample HelloWorld Rule file to the project. Accept this
default to test the sample project in the next step.
3. T o test the project, right click the Java file that contains the main method and select Run → run
as → Java Application.
T he output will be displayed in the console tab.
Report a bug
28 Revision History
Revision History
Revision 5.3.1-18 Mon Dec 03 2012 L Carlon
Updated documentation for the JBoss Enterprise BRMS Platform 5.3.1 release.