BRMS Administrator Guide
For JBoss Administrators
Edition 5.3.1
Red Hat Content Services
Abstract
Preface
Chapter 1. Introduction
1.1. JBoss Enterprise Business Rules Management System Platform
Chapter 2. Database Configuration
2.1. JBoss Enterprise BRMS and Apache Jackrabbit
2.2. Specifying the Repository Location
components.xml
configuration file.
Procedure 2.1. Specify the Repository's Location
- Shutdown the Application Server
- Open the
components.xml
file which is located in thedeploy/jboss-brms.war/WEB-INF/
directory, and uncomment the repository.root.directory Key-Value attributes.<property name="properties"> <key>org.drools.repository.configurator</key> <value>org.drools.repository.jackrabbit.JackrabbitRepositoryConfigurator</value> <!-- the root directory for the repo storage the directory must exist. --> <!-- <key>repository.root.directory</key><value>/opt/yourpath</value> --> </property>
- Add the desired location of the repository to the repository.root.directory Key-Value Attribute. (This directory must already exist.)
<property name="properties"> <key>org.drools.repository.configurator</key> <value>org.drools.repository.jackrabbit.JackrabbitRepositoryConfigurator</value> <!-- the root directory for the repo storage the directory must exist. --> <key>repository.root.directory</key> <value>/BRMSRulesRepositoryLocation</value> </property>
- The JBoss Enterprise BRMS Platform will create a new datastore at that location if there is not already one there. To keep an existing datastore, copy the existing files to the new location before restarting the application server.
- Restart the application server. If an existing datastore was not moved to the new location, a new datastore will be created.
2.3. Configuring an External RDBMS
Procedure 2.2. Configure an External RDBMS with the Repository Configuration Tool
- Log on to the JBoss Enterprise BRMS Platform User Interface.
- From the navigation panel on the left select Administration → Repository Configuration.
- Select the RDBMS type from the Select RDBMS type: drop-down menu.
- If JNDI is configured, check USE JNDI and enter the JNDI Name.
- If JNDI is not configured, enter the required database information:
- Driver
- URL
- User
- Password
- Click Generate repository config to generate the
repository.xml
file. - Click Save Configuration to download the generated
repository.xml
file and replace the existingrepository.xml
in the location specified in thecomponents.xml
file.
2.4. Indexing Foreign Keys
Human-Task schema:
- Task.processinstanceid
- task.processid
- task.status
- task.archived
- task.workitem
- i18ntext.language
Core engine schema:
- eventtables.instanceid
2.5. Configuring a Datasource for JBoss Enterprise Web Server
jbpm-human-task.war
and business-central-server.war
.
Procedure 2.3. Configuring a datasource for JBoss Enterprise Web Server
- Copy the MySQL driver to
tomcat6/lib/
- Configure the datasource resources in
tomcat6/conf/context.xml
:<Resource name="jdbc/jbpmDS" auth="Container" type="javax.sql.DataSource" factory="bitronix.tm.resource.ResourceObjectFactory" uniqueName="jdbc/jbpmDS"/> <Resource name="jdbc/jbpmTasksDS" auth="Container" type="javax.sql.DataSource" factory="bitronix.tm.resource.ResourceObjectFactory" uniqueName="jdbc/jbpmTasksDS"/>
- Edit the
tomcat6/webapps/business-central-server.war/WEB-INF/Classes/META-INF/persistence.xml
file to include the unique name fromcontext.xml
:<jta-data-source>java:/comp/env/jdbc/jbpmDS</jta-data-source> ... <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" />
- Edit the
tomcat6/webapps/jbpm-human-task.war/WEB-INF/classes/META-INF/persistence.xml
file to include the unique name fromcontext.xml
:<jta-data-source>java:/comp/env/jdbc/jbpmTasksDS</jta-data-source> ... <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/> <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" />
- JBoss Enterprise Web Server does not include a transaction manager. The following example shows the configuration for Bitronix, and it is provided for evaluation purposes only. Bitronix can be downloaded from http://docs.codehaus.org/display/BTM/Home.
#file resources.properties resource.ds1.className=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource resource.ds1.uniqueName=jdbc/jbpmDS resource.ds1.minPoolSize=0 resource.ds1.maxPoolSize=10 resource.ds1.driverProperties.user=guest resource.ds1.driverProperties.password=guest resource.ds1.driverProperties.URL=jdbc:mysql://localhost:3306/jbpmprocess resource.ds1.allowLocalTransactions=true resource.ds2.className=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource resource.ds2.uniqueName=jdbc/jbpmTasksDS resource.ds2.minPoolSize=0 resource.ds2.maxPoolSize=10 resource.ds2.driverProperties.user=guest resource.ds2.driverProperties.password=guest resource.ds2.driverProperties.URL=jdbc:mysql://localhost:3306/jbpmtasks resource.ds2.allowLocalTransactions=true
- To configure the Bitronix transaction manager, create a
tomcat6/conf/btm-config.properties
file: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
Add the following line totomcat6/conf/context.xml
:<Transaction factory="bitronix.tm.BitronixUserTransactionObjectFactory"/>
Add the following line totomcat6/conf/server.xml
<Listener className="bitronix.tm.integration.tomcat55.BTMLifecycleListener"/>
Create a configuration properties file. On unix based systems the file should betomcat6/setenv.sh
, and on Windows systems the file should betomcat6/setenv.bat
.CATALINA_OPTS="-Dbtm.root=$CATALINA_HOME -Dbitronix.tm.configuration=$CATALINA_HOME/conf/btm-config.properties"
2.6. Configuring a Datasource for JBoss Enterprise Application Platform 6
Procedure 2.4. Configuring a Datasource for JBoss Enterprise Platform 6
- Add a directory for the database to the JBoss Enterprise Application Platform 6 directory structure. The directory should be named for the database that will be used. For instance, for a PostgreSQL database create the following structure:
jboss-eap-6.0/modules/org/postgresql/
For a MySQL database, create the following structure:jboss-eap-6.0/modules/com/mysql/
- Download the corresponding JBDC driver for the database.
- Create a
main
directory in the directory created for the database:jboss-eap-6.0/modules/org/postgresql/main/
Copy the JBDC driver into thejboss-eap-6.0/modules/org/postgresql/main/
directory. - Create a
module.xml
file and save it tojboss-eap-6.0/modules/org/postgresql/main/
with the following content:<?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.0" name="org.postgresql"> <resources> <resource-root path="postgresql-8.4-xxx.jdbc4.jar"/> </resources> <dependencies><module name="javax.api"/></dependencies> </module>
- Edit the profile configuration file, for instance,
jboss-eap-6.0/standalone/configuration/standalone.xml
configured for a PostgreSQL database calledjbpmDS
, and a user called sa with a password sa:<subsystem xmlns="urn:jboss:domain:datasources:1.1"> <datasources> <datasource jta="true" jndi-name="java:jboss/datasources/jbpmDS" pool-name="java:jboss/datasources/jbpmDS_Pool" enabled="true" use-java-context="true" use-ccm="true"> <connection-url>jdbc:postgresql:mem:test;DB_CLOSE_DELAY=-1</connection-url> <driver-class>org.postgresql.Driver</driver-class> <driver>postgresql-jdbc4</driver> <pool> <min-pool-size>2</min-pool-size> <max-pool-size>20</max-pool-size> <prefill>true</prefill> </pool> <security> <user-name>sa</user-name> <password>sa</password> </security> <validation> <check-valid-connection-sql>SELECT 1</check-valid-connection-sql> <validate-on-match>false</validate-on-match> <background-validation>false</background-validation> <use-fast-fail>false</use-fast-fail> </validation> </datasource> <drivers> <driver name="postgresql-jdbc4" module="org.postgresql"/> </drivers> </datasources> </subsystem>
- Edit the
jboss-eap-6.0/standalone/deployments/business-central-server.war/WEB-INF/classes/META-INF/persistence.xml
file and change the hibernate dialect to PostgreSQL:<jta-data-source>java:jboss/datasources/jbpmDS</jta-data-source> . . <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
- Edit the
jboss-eap-6.0/standalone/deployments/jbpm-human-task.war/WEB-INF/classes/META-INF/persistence.xml
file and change the hibernate dialect to PostgreSQL:<non-jta-data-source>java:jboss/datasources/jbpmDS</non-jta-data-source> . . <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
2.7. Clustering JBoss BRMS with Jackrabbit
Procedure 2.5. Setting up Clustering with Jackrabbit
- Set up a JBoss Enterprise Application Platform cluster, refer to the JBoss Enterprise Application Platform 5 Clustering Guide which is located in the Administration and Configuration Guide.
- Set up a load balancer, refer to the JBoss Enterprise Application Platform 5 HTTP Connectors Load Balancing Guide.
- Deploy a copy of jboss-brms.war to each node of the application server cluster
$JBOSS_HOME/server/nodeX/deploy/
- The Default configuration uses 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 other sections in this chapter for configuration instructions.
- Each node in the cluster must have an individual workspace, version, and search index configured in the
repository.xml
file. Generate therepository.xml
for the required database by logging in to the JBoss Enterprise BRMS user interface and selecting Administration → Repository Configuration. - Copy the
repository.xml
file to the repository location specified in thejboss-brms.war/WEB-INF/components.xml
in each node of the cluster. - Each node in the cluster must have a unique ID, which is set in each node's copy of the
repository.xml
file. For instance:<Cluster id="01" syncDelay="2000"> <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal"> <param name="revision" value="${rep.home}/revision.log" /> <param name="driver" value="javax.naming.InitialContext" /> <param name="url" value="brms-jdbc-ds" /> <param name="schema" value="mysql"/> </Journal> </Cluster>
- Add the
<distributable/>
element as a child element of theweb-app
element to thejboss-brms.war/WEB-INF/web.xml
file. - Verify the Cluster Nodes are working by logging into the JBoss Enterprise BRMS user interface. Examine the terminal output to confirm which node is handling the session. Shut down that node, after a short interval another node in the cluster should take over the session.
2.8. Using Modeshape as the JCR
- The BRMS standalone package has been downloaded and installed, refer to the JBoss Enterprise BRMS Getting Started Guide for further instructions.
- Apache Ant is installed. Refer to the appendix at the back of this guide for directions.
- A supported database server is required for production deployment. Refer to https://access.redhat.com/knowledge/articles/119933 for a complete list of supported database servers.
- The database instance that will be used has already been created.
- A database user with permissions to change the database exists.
- The JDBC driver JAR file for the database is in the
lib/
directory of the server configuration.
Procedure 2.6. Configure ModeShape
- Run the ant installer from the ModeShape directory and specify the server profile ModeShape will be installed to.
[localhost modeshape]$ ant Buildfile: /opt/BRMS/5.3.1/brms-standalone-5.3.1/modeshape/build.xml determine_home: set-web-home: set-as-home: set-soa-home: init: [echo] JBoss Home is ../jboss-as-web prompt: [input] Enter profile to install ModeShape to: [default]
- Add the user accounts
admin
andmailman
, and assign the roles specified below. The default configuration uses text files to store the usernames, passwords, and assigned roles. The directions here assume that the authorization configuration has not been changed. If it has been changed, then add the users according to that configuration.- Open the file
PROFILE/conf/props/brms-users.properties
in a text editor and add the usersadmin
andmailman
to this file as a new line with the syntax:username=password
.admin=s3kr3t5 mailman=53cur3m@1l
- Assign the roles specified below to the two users by opening the
PROFILE/conf/props/brms-roles.properties
file in a text editor and adding a new line for each user with the syntaxusername=role1, role2, role3
.Theadmin
user must be assigned the roles ofJBossAdmin
,HttpInvoker
,user
, andadmin
.Themailman
user must be assigned the roles ofJBossAdmin
,readwrite
.admin=JBossAdmin, HttpInvoker, user, admin mailman=JBossAdmin, readwrite
- Optionally, the passwords can be stored in encoded form instead of plain text. To do this run the following command in the application server directory (
jboss-as
orjboss-as-web
) to create the encoded form of the password, replacing PASSWORD with the chosen password.[localhost]$ java -cp client/jboss-logging-spi.jar:lib/jbosssx.jar org.jboss.resource.security.SecureIdentityLoginModule PASSWORD Encoded password: 5f78dc15b9a559cbdf8592078de921bc
Then replace the passwords stored inPROFILE/conf/props/brms-users.properties
with the encoded versions.
- The default configuration for Modeshape uses a database that is not suitable or supported in production environments. Before deploying into a production environment, this configuration must be changed to a supported database server.The default Modeshape repository configuration uses a JNDI data source —
ModeShapeBRMSRepo
— for data storage which is configured in thePROFILE/deploy/modeshape-brms-store-ds.xml
file. Edit this file to change the data source configuration from Hypersonic to the database of your choice. This file is a standard JBoss data source configuration file.Refer to the Datasource Configuration chapter of the Application server documentation for details to configure JBoss data sources. - Edit the
jboss-brms.war/WEB-INF/components.xml
file to remove the Apache Jackrabbit configuration and add the ModeShape configuration.To remove the Apache Jackrabbit configuration, comment out the following section:<property name="properties"> <key>org.drools.repository.configurator</key> <value>org.drools.repository.jackrabbit.JackrabbitRepositoryConfigurator</value> <!-- the root directory for the repo storage the directory must exist. --> <!-- <key>repository.root.directory</key><value>/opt/yourpath</value> --> </property>
The ModeShape configuration is commented out in the default configuration. Uncomment the configuration as shown below:<property name="properties"> <key>org.drools.repository.configurator</key> <value>org.drools.repository.modeshape.ModeShapeRepositoryConfigurator</value> <key>org.modeshape.jcr.URL</key><value>jndi:jcr/local?repositoryName=jcrrepo</value> <key>org.drools.repository.secure.passwords</key><value>false</value> <key>org.drools.repository.admin.password</key><value>admin</value> <key>org.drools.repository.mailman.password</key><value>mailman</value> </property>
- ModeShape requires two user accounts to exist,
admin
andmailman
. The passwords for these accounts must be specified in the ModeShape configuration from the previous step.<key>org.drools.repository.secure.passwords</key><value>false</value> <key>org.drools.repository.admin.password</key><value>password</value> <key>org.drools.repository.mailman.password</key><value>password</value>
- Restart the server.
2.9. Searching and Indexing
repository.xml
file's <SearchIndex>
element:
<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex"> <param name="path" value="${wsp.home}/index"/> <param name="extractorPoolSize" value="2"/> <param name="supportHighlighting" value="true"/> </SearchIndex>
Chapter 3. Data Management
3.1. Data Backups
3.2. Importing and Exporting Data
3.2.1. Migrating Data
Warning
- When importing, all existing content in the database is removed.
- Export or import operations should only be conducted when the database is not in use.
- Performance is extremely dependent on both the size of the database and the memory available to the server. Importing is a very memory-intensive process.
- Repository version history is not exported and rules will have their Creation Date attribute re-set to the date on which they are imported.
3.2.2. Exporting the Repository
Procedure 3.1. Exporting the Repository
- From the navigation panel on the left hand side of the BRMS User Interface select Administration → Import Export.
- Click Export.
3.2.3. Importing the Repository
Procedure 3.2. Importing the Repository
- From the navigation panel select Administration → Import Export.
- Select the XML file containing the exported data by clicking the Browse button and browsing the local filesystem.
- Click Import and select OK on the confirmation dialog.
Chapter 4. Security
4.1. Authentication
4.1.1. Authentication
4.1.2. Configuring Authentication
jboss-brms.war/WEB-INF/components.xml
file. The default configuration has many "commented out" options but the actual settings look like this:
<security:identity authenticate-method="#{authenticator.authenticate}" jaas-config-name="jmx-console"/> <component name="org.jboss.seam.security.roleBasedPermissionResolver"> <property name="enableRoleBasedAuthorization">false</property> </component>
Note
<security:identity authenticate-method="#{authenticator.authenticate}" jaas-config-name="jmx-console"/> <security:role-based-permission-resolver enable-role-based-authorization="false"/>
Important
jmx-console
authentication policy. Red Hat recommends editing this policy to tailor it for your specific environment.
- Edit the appropriate JBoss login module of the application server.
- Configure the JBoss Enterprise BRMS Platform to use that module.
Note
Warning
4.1.3. Password Configuration for JAAS
brms-users.properties
file, they also need to be synchronized for the Process Designer and Business Central Console.
Procedure 4.1. Synchronizing Usernames and Passwords
- Process Designer: To 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.xml
file and edit theusr
andpwd
properties:usr="admin" pwd="admin"
- Business Central Console. To 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 theguvnor.usr
andguvnor.pwd
properties:guvnor.usr=admin guvnor.pwd=admin
4.1.4. Example Authentication: UserRolesLoginModule
org.jboss.security.auth.spi.UsersRolesLoginModule
login module to access a set of user accounts stored in the props/brms-users.properties
and props/brms-roles.properties
files.
Procedure 4.2. Authentication Example: UserRolesLoginModule
Ensure the Authentication System is Configured Correctly
This login module uses two files to store the login name, password, and roles assigned to each user. Create thebrms-users.properties
andbrms-roles.properties
files in thejboss-as-web/server/PROFILE/conf/props/
directory and then specify at least one user inbrms-users.properties
using this format:username=password
. (thebrms-roles.properties
file can be left empty.)Shut Down
Shut down the application server before making these changes.Configure the JBoss Login Module
To configure the JBoss Login Modules, openjboss-as-web/server/PROFILE/conf/login-config.xml
in a text editor. It is an XML file containing a<policy>
element with several<application-policy>
child elements. Each<application-policy>
element defines a different authentication scheme. Add the following<application-policy>
XML snippet as a new child of the<policy>
element:<!--BRMS Platform Security Domain--> <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>
Configure the BRMS Platform to use the Login Module
Open thejboss-as-web/server/PROFILE/deploy/JBoss-BRMS.war/WEB-INF/components.xml
file. It contains one<components>
element with several child elements, including<security:identity>
.Comment out the existing<security:identity>
elements to prevent conflicts. Add the following<security:identity>
element:<security:identity authenticate- method="#{authenticator.authenticate}" jaas-config-name="brms"/>
The jaas-config-name property must be the same as the application-policy. If the application-policy property was changed in the previous step, modify the jaas-config-name property here to match.Restart
Restart the application server.
4.1.5. Example Authentication: LDAP
Procedure 4.3. Authentication Example Two: LDAP
Ensure the LDAP Server is Configured Correctly
Check that firewall and network configuration settings are not preventing communication between the application server and the LDAP server.Shut Down
Shut down the application server before making these changes.Configure the JBoss Login Module
To configure the JBoss Login Modules, openjboss-as-web/server/PROFILE/conf/login-config.xml
in a text editor. It is an XML file containing a<policy>
element with several<application-policy>
child elements. Each<application-policy>
element defines a different authentication scheme. Add the following<application-policy>
XML snippet as a new child of the<policy>
element:<application-policy name="brms"> <authentication> <login-module code="org.jboss.security.auth.spi.LdapExtLoginModule" flag="required" > <module-option name="java.naming.provider.url"> ldap://ldap.company.com:389 </module-option> <module-option name="bindDN">DEPARTMENT\someadmin</module-option> <module-option name="bindCredential">password</module-option> <module-option name="baseCtxDN">cn=Users,dc=company,dc=com </module-option> <module-option name="baseFilter">(sAMAccountName={0})</module-option> <module-option name="rolesCtxDN">cn=Users,dc=company,dc=com </module-option> <module-option name="roleFilter">(sAMAccountName={0})</module-option> <module-option name="roleAttributeID">memberOf</module-option> <module-option name="roleAttributeIsDN">true</module-option> <module-option name="roleNameAttributeID">cn</module-option> <module-option name="roleRecursion">-1</module-option> <module-option name="searchScope">ONELEVEL_SCOPE</module-option> </login-module> </authentication> </application-policy>
Update the values in this configuration file with those appropriate for your LDAP server.Configure the BRMS Platform to use the Login Module
Open thejboss-as-web/server/PROFILE/deploy/jboss-brms.war/WEB-INF/components.xml
file. It contains one<components>
element with several child elements, including<security:identity>
.Comment out the existing<security:identity>
elements to prevent conflicts. Add the following<security:identity>
element:<security:identity authenticate-method="#{authenticator.authenticate}" jaas-config-name="brms"/>
The jaas-config-name property must be the same as the application-policy. If the application-policy property was changed in the previous step, modify the jaas-config-name property here to match.Restart
Restart the application server.
4.2. Managing Users
4.2.1. Role-Based Permissions
- Admin Permissions
- Users who have been assigned the admin role have complete access to all areas of the JBoss Enterprise BRMS Platform and can manage other user's permissions.
- Analyst Permissions
- Analyst permissions are intended for the users responsible for maintaining rules. Both developers and business analysts should be granted analyst permissions. Analysts permissions are associated with categories. This makes it possible to manage which rules users are granted analyst permissions for.In addition to the analyst permissions, it is also possible to grant users Analyst read-only permissions. This allows the user to view the rules in a category, but it does not allow users to edit or change them.
- Package Permissions
- There are three types of package permissions:
- Package Administrator
- The package administrator permission grants full control over the specified package, including the right to deploy it. The Package Administrator permission does not grant any administrative rights to any other part of the JBoss Enterprise BRMS Platform.
- Package Developer
- Package developer permits users to create and edit items within the specified package. This includes being able to create and run tests but does not include the right to deploy the package.
- Package Read-only
- The package read-only permission grants read-only permissions to a package allowing a user to view the package.
4.2.2. Adding a New User
Procedure 4.4. Add a New User to BRMS
- Select Administration from the navigation panel, then select User Permissions.
- Add user mapping by clicking on the Create new user mapping button. Type the username into the dialogue box that appears, and then click OK.
Note
The username that is specified for the role must match a username in the authentication service or it will not work.
4.2.3. Managing User Permissions
Procedure 4.5. Manage User Permissions
- Select Administration from the navigation pane, then select User Permissions.
- Click Open next to the username.
- Assign user permissions by clicking the plus icon and selecting the appropriate permissions from the Permission type drop-down menu. Click OK to confirm.
Remove User Permissions
Remove user permissions by clicking the minus icon next to the permission being removed, and click OK to confirm.
4.3. Rule Package Signing
4.3.1. Rule Package Signing
4.3.2. Configuring the Server for Rule Package Signing
- Create a private signing key and a corresponding public digital certificate.
- Make the private signing key and the digital certificate available to the server in keystores.
- Configure the server to use the keystores.
Procedure 4.6. Configure Rule Package Signing
- Use the
keytool
command to create the private keystore:keytool -genkey -alias ALIAS -keyalg RSA -keystore PRIVATE.keystoreThe-alias
parameter specifies the name used to link the related entities in the keystore. Use the same alias for each of these steps. The alias is not case-sensitive. The-keystore
parameter supplies the name of the file which will be created to hold the private key.keytool
will prompt you for identifying information as well as two passwords. The first password, the keystore password, secures the keystore. The second password, the key password, secures the key that is being created.[localhost ]$ keytool -genkey -alias BRMSKey -keyalg RSA -keystore PrivateBRMS.keystore Enter keystore password: Re-enter new password: What is your first and last name? [Unknown]: John Smith What is the name of your organizational unit? [Unknown]: Accounts What is the name of your organization? [Unknown]: ACME INC What is the name of your City or Locality? [Unknown]: Capital City What is the name of your State or Province? [Unknown]: CC What is the two-letter country code for this unit? [Unknown]: US Is CN=John Smith, OU=Accounts, O=ACME INC, L=Capital City, ST=CC, C=US correct? [no]: yes Enter key password for <BRMSKey> (RETURN if same as keystore password): Re-enter new password:
- Use the
keytool
command to create a digital certificate:keytool -export -alias ALIAS -file CERTIFICATE.crt -keystore PRIVATE.keystoreUse the same alias and keystore as the previous step. The-file
parameter is the filename of the new certificate that will be created. The-keystore
parameter supplies the filename of the private keystore.Enter the keystore password at the prompt.[localhost ]$ keytool -export -alias BRMSKey -file BRMSKey.crt -keystore PrivateBRMS.keystore Enter keystore password: Certificate stored in file <BRMSKey.crt>
- Use the
keytool
command to import the digital certificate into a keystore:keytool -import -alias ALIAS -file CERTIFICATE.crt -keystore PUBLIC.keystoreThis will create a new keystore, the truststore, which contains the digital certificate. The truststore makes the digital certificate available to client applications.[localhost ]$ keytool -import -alias BRMSKey -file BRMSKey.crt -keystore PublicBRMS.keystore Enter keystore password: Re-enter new password: Owner: CN=John Smith, OU=Accounts, O=ACME INC, L=Capital City, ST=CC, C=US Issuer: CN=John Smith, OU=Accounts, O=ACME INC, L=Capital City, ST=CC, C=US Serial number: 4ca0021b Valid from: Sun Sep 26 22:31:55 EDT 2010 until: Sat Dec 25 21:31:55 EST 2010 Certificate fingerprints: MD5: 31:1D:1B:98:59:CC:0E:3C:3F:57:01:C2:FE:F2:6D:C9 SHA1: 4C:26:52:CA:0A:92:CC:7A:86:04:50:53:80:94:2A:4F:82:6F:53:AD Signature algorithm name: SHA1withRSA Version: 3 Trust this certificate? [no]: yes Certificate was added to keystore
- The private keystore needs to be kept in a secure location where only the JBoss Enterprise BRMS Platform server is able to access it. This could be on the same machine or in a secured network location that is available to that machine.
Important
The JBoss Enterprise BRMS Platform is not able to supply authentication credentials to network resources. If the private keystore is stored in a secure network location, then any authentication procedures must be performed on the behalf of the JBoss Enterprise BRMS server to make the private keystore available to it. For example, the operating system can authenticate and mount a file share that holds the private keystore as a local directory for the JBoss Enterprise BRMS Platform server to access. - The truststore needs to be accessible to client applications. This can be done by putting the truststore on network share or hosting it on a webserver.
- The Drools serialization system properties need to be set on the server. These are the properties that store the information required to access the keystores. Because JBoss Enterprise BRMS Platform also contains client components, both the private keystore and truststore properties have to be set on the server. The properties only need to be set in one location and will be available to all applications running on the same application server instance regardless of where they are set.Set the serialization properties by editing the
preferences.properties
file, which is located inserver/profile/deploy/jboss-brms.war/WEB-INF/
to include the following properties:drools.serialization.sign=true drools.serialization.private.keyStoreURL=file:///opt/secure/PrivateBRMS.keystore drools.serialization.private.keyStorePwd=storepassgoeshere drools.serialization.private.keyAlias=BRMSKey drools.serialization.private.keyPwd=keypassgoeshere drools.serialization.public.keyStoreURL=file:///opt/public/PublicBRMS.keystore drools.serialization.public.keyStorePwd=keypassgoeshere
- The keystore password is currently stored in plain text.Refer to https://access.redhat.com/kb/docs/DOC-47247 for instructions to mask the keystore credentials.
4.3.3. Configuring the Client for Rule Package Signing
System.setProperty
method. The class org.drools.core.util.KeyStoreHelper
class contains several constants that represent these properties.
- A JBoss Enterprise BRMS Platform Server already installed and correctly configured for Rule Package Signing.
- The URL for the truststore that contains the Digital Certificate used by the JBoss Enterprise BRMS Platform Server.
- The password for the truststore, if one is set.
Procedure 4.7. Client Configuration for Rule Package Signing
- Enable signing by setting the
drools.serialization.sign
property totrue
.System.setProperty( KeyStoreHelper.PROP_SIGN, "true" );
- Set the
drools.serialization.public.keyStoreURL
property to the URL where the TrustStore is located. If the TrustStore is in the classpath of the client then this can be done using thegetClass().getResource()
method.Example 4.1. When the TrustStore is located on the client's classpath
URL trustStoreURL = getClass().getResource( "BRMSTrustStore.keystore" ); System.setProperty( KeyStoreHelper.PROP_PUB_KS_URL, trustStoreURL.toExternalForm() );
Example 4.2. When the TrustStore is located on a webserver
URL trustStoreURL = new URL("http://brms.intranet/resources/BRMSTrustStore.keystore" ); System.setProperty( KeyStoreHelper.PROP_PUB_KS_URL, trustStoreURL.toExternalForm() );
Example 4.3. When the TrustStore is located on the local file system
URL trustStoreURL = new URL("file:///mnt/fileserve/rules-server/BRMSTrustStore.keystore" ); System.setProperty( KeyStoreHelper.PROP_PUB_KS_URL, trustStoreURL.toExternalForm() );
- Set the
drools.serialization.public.keyStorePwd
property to the password for the truststore. This is only required if a password is required to access the truststore.System.setProperty( KeyStoreHelper.PROP_PUB_KS_PWD, "sekretPasswordHere" );
Chapter 5. Logging
5.1. Logging
log4j
.
WAR
, WEB-INF/classes/log4j.xml
, sends all messages to STDOUT
. When deployed to the production
server profile, the log messages are appended to the server log file, PROFILE/log/server.log
. When deployed to the default
server profile, these messages are displayed on the server console.
5.2. Configuring Logging
log4j
configuration file for the relevant server profile: jboss-as-web/server/PROFILE/conf/jboss-log4j.xml
.
default
server profile's log4j
configuration to create a new category that directs the STDOUT messages to the server log file:
<category name="STDOUT" additivity="false"> <priority value="INFO" /> <appender-ref ref="FILE"/> </category>
5.3. Removing Extra Log Messages
INFO [TransientRepository] Session closed
jboss-as/server/profile/conf/jboss-log4j.xml
:
<!-- Limit the verbose JackRabbit TransientRepository --> <category name="org.apache.jackrabbit.core.TransientRepository"> <priority value="WARN"/> </category>
Chapter 6. Customization
6.1. Available Languages
- United States English (
en-US
) - Japanese (
ja-JP
) - Simplified Chinese (
zh-CN
)
6.2. Changing the User Interface Language
Procedure 6.1. Change the User Interface Language
- Edit the
index.jsp
file, which is located in thejboss-brms.war
directory, to specify an alternative locale. The defaultindex.jsp
file uses United States English as the language.Example 6.1. The default
index.jsp
<% String redirectURL = "org.drools.guvnor.Guvnor/Guvnor.html"; response.sendRedirect(redirectURL); %>
To specify Japanese as the default language, edit the file as follows:Example 6.2.
index.jsp
with Japanese as the default language<% String redirectURL = "org.drools.guvnor.Guvnor/Guvnor.html?locale=ja_JP"; response.sendRedirect(redirectURL); %>
To specify Simplified Chinese as the default language, edit the file as follows:Example 6.3.
index.jsp
with Simplified Chinese as the default language<% String redirectURL = "org.drools.guvnor.Guvnor/Guvnor.html?locale=zh_CN"; response.sendRedirect(redirectURL); %>
Edit preferences.properties
Edit thepreferences.properties
file to specify the required default country and default language codes. Thepreferences.properties
file is located in thejboss-brms.war/WEB-INF/classes/
directory. The defaultpreferences.properties
file uses United States English as the language and the United States as the default country.Example 6.4. preferences.properties with US defaults
drools.defaultlanguage=en drools.defaultcountry=US
To specify Japanese as the default language, edit the file as follows:Example 6.5. preferences.properties with Japanese defaults
drools.defaultlanguage=ja drools.defaultcountry=JP
To specify Simplified Chinese as the default language, edit the file as follows:Example 6.6. preferences.properties with Simplified Chinese Defaults
drools.defaultlanguage=zh drools.defaultcountry=CH
Change the Date Format
If multiple instances of the JBoss BRMS user interface are deployed with different languages specified, the format of the date must be changed so that each instance can correctly interpret the date. The following procedure can only be performed on new installations of JBoss Enterprise BRMS that do not include existing rules or test scenarios that include date values, as changing the format will corrupt existing date values.Specify the date format inpreferences.properties
.Change the date format from:drools.dateformat=dd-MMM-yyyy
To:drools.dateformat=yyyy-MM-dd
Note
The change in format is only effective after the JBoss Enterprise BRMS server has been restarted.
Complete URLs for the Supported Languages
- Japanese
- Simplified Chinese
- US English
6.3. Running the JVM with UTF-8 Encoding
6.4. Customizing the User Interface
.css
files and some of the images are found in the jboss-brms.war/org.drools.guvnor.Guvnor/
directory. (The remainder of the images are located in the images
sub-directory.) To access them, the WAR file must be deployed as an exploded archive as described in the BRMS Getting Started Guide.
CSS
files and leave the filenames unchanged. If problems are encountered, restore the original versions of the files from the WAR
archive.
Note
hdrlogo_brms.gif
and drools.gif
respectively.)
Guvnor.css
controls the overall styling of the page elements.
Warning
CSS
files. Do not change these.
jboss-brms.war/WEB-INF/web.xml
. Use the same process as for any other Java web application.
Chapter 7. Monitoring
7.1. Monitoring Knowledge Bases and Knowledge Sessions
-Ddrools.mbeans = enabled
KnowledgeBaseConfiguration conf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration(); conf.setOption( MBeansOption.ENABLED );
7.2. The Drools Knowledge Base Monitoring Service
- Start all internal MBeans
- Stop all internal MBeans
7.3. The Drools Knowledge Session Monitoring Service
- Reset all metrics counters.
- Return statistics for a specific rules.
- Get statistics for a specific process.
- Get statistics for a specific process instance.
- The total number of facts in working memory.
- The total number of activations created since the last reset.
- The total number of activations fired since the last reset.
- The total number of activations canceled since the last reset.
- The total time spent firing rules since the last reset.
- The total number of process instances started since the last reset.
- The total number of process instances completed since the last reset.
- The timestamp of the last reset operation.
Appendix A. Apache Ant
A.1. Installing Apache Ant
Procedure A.1. Installing Apache Ant on Red Hat Enterprise Linux
- Download and install Apache Ant and the Trax plugin on Red Hat Enterprise Linux Repository by issuing this command:
[localhost]$ sudo yum install ant-trax
Procedure A.2. Installing Apache Ant on Other Operating Systems
Download and Extract
Download theApache Ant
binary release from http://ant.apache.org/bindownload.cgi.Once it is downloaded, extract it in a preferred installation location, such asc:\Program Files\Apache\Ant\
or/opt/apache-ant-1.8/
.Add the ANT_HOME Environment Variable
Create an environment variable calledANT_HOME
. This variable has to contain the path created in the previous step.- Do this on Red Hat Enterprise Linux by adding the following line to the
~/.bash_profile
file, substituting the path with that created in the previous step.export ANT_HOME=/opt/apache-ant-1.8.1
- On Microsoft Windows, do this by clicking on the Start Menu, opening the Control Panel and then selecting System -> Advanced -> Environment Variables.Create a new variable, calling it
ANT_HOME
, and configure it to point to the directory created in the previous step.
Include
bin
in thePATH
Append thebin
directory of the Ant installation to thePATH
environmental variable.- On Unix/Linux systems, one does this simply by adding the following line to the
~/.bash_profile
file after the one which sets theANT_HOME
variable:export PATH=$PATH:$ANT_HOME/bin
- On Microsoft Windows, do this task by opening the Control Panel and selecting System -> Advanced -> Environment Variables -> System Variables. Edit the
PATH
variable and append the text;%ANT_HOME%\bin
.
ant -version
from a command line shell. The output should look similar to this:
[localhost]$ ant -version Apache Ant version 1.8 compiled on June 27 2008
Apache Ant
, visit the project's website at http://ant.apache.org.
Appendix B. Persistence Manager Configurations
B.1. Example Persistence Manager Configurations
Important
Example B.1. Generic JDBC Configuration for MySQL using BundleDbPersisenceManager
<PersistenceManager class= "org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager"> <param name="driver" value="com.mysql.jdbc.Driver"/> <param name="url" value="jdbc:mysql://localhost/brms"/> <param name="user" value="brms_user"/> <param name="password" value="brms_password"/> <param name="schema" value="mysql"/> <param name="schemaObjectPrefix" value="${wsp.name}_"/> </PersistenceManager>
Example B.2. MySQL Configuration using MySqlPersistenceManager
<PersistenceManager class= "org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager"> <param name="driver" value="com.mysql.jdbc.Driver"/> <param name="url" value="jdbc:mysql://localhost:3306/brms"/> <param name="user" value="brms_user"/> <param name="password" value="brms_password"/> <param name="schemaObjectPrefix" value="${wsp.name}_"/> <param name="schema" value="mysql"/> </PersistenceManager>
Example B.3. Oracle Configuration using OraclePersistenceManager
<PersistenceManager class= "org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager"> <param name="driver" value="oracle.jdbc.OracleDriver"/> <param name="url" value="jdbc:oracle:thin:@localhost:1521:brms" /> <param name="schema" value="oracle"/> <param name="user" value="brms_user" /> <param name="password" value="brms_password" /> <param name="schemaObjectPrefix" value="${wsp.name}_" /> </PersistenceManager>
Example B.4. PostgreSQL Configuration using PostgreSQLPersistenceManager
<PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle. PostgreSQLPersistenceManager"> <param name="driver" value="org.postgresql.Driver"/> <param name="url" value="jdbc:postgresql://localhost:5432/brms" /> <param name="schema" value="postgresql"/> <param name="user" value="brms_user" /> <param name="password" value="brms_password" /> <param name="schemaObjectPrefix" value="${wsp.name}_" /> </PersistenceManager>
Example B.5. Microsoft SQL Server 2005 Configuration using MSSqlPersistenceManager
<PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle. MSSqlPersistenceManager"> <param name="driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/> <param name="url" value="jdbc:sqlserver://localhost:3918;DatabaseName=brms" /> <param name="user" value="brms_user" /> <param name="password" value="brms_password" /> <param name="schema" value="mssql"/> <param name="schemaObjectPrefix" value="${wsp.name}_" /> </PersistenceManager>
Appendix C. Camel Integration
C.1. Example Configuration for Camel Integration
Drools-camel-server/src/main/resources/
directory:
- beans.xml
- camel-server.xml
- knowledge-server.xml
- soap-wsdl
- test.drl
Example C.1. beans.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd" default-autowire="byName"> <!-- loads the kbases and ksessions into the ApplicationContext --> <import resource="classpath:knowledge-services.xml" /> <!-- Builds the routes that makes the ksessesions available as services --> <import resource="classpath:camel-server.xml" /> </beans>
Example C.2. camel-server.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cxf="http://camel.apache.org/schema/cxf" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd "> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> <!-- ! If you are running on JBoss you will need to copy a camel-jboss.jar into the lib and set this classloader configuration | http://camel.apache.org/camel-jboss.html <bean id="jbossResolver" class="org.apache.camel.jboss.JBossPackageScanClassResolver"/> --> <!-- ! Define the server end point. ! Copy and paste this element, changing id and the address, to expose services on different urls. ! Different Camel routes can handle different end point paths. --> <cxf:rsServer id="rsServer" address="/rest" serviceClass="org.drools.jax.rs.CommandExecutorImpl"> <cxf:providers> <bean class="org.drools.jax.rs.CommandMessageBodyReader"/> </cxf:providers> </cxf:rsServer> <cxf:cxfEndpoint id="soapServer" address="/soap" serviceName="ns:CommandExecutor" endpointName="ns:CommandExecutorPort" wsdlURL="soap.wsdl" xmlns:ns="http://soap.jax.drools.org/" > <cxf:properties> <entry key="dataFormat" value="MESSAGE"/> <entry key="defaultOperationName" value="execute"/> </cxf:properties> </cxf:cxfEndpoint> <!-- Leave this, as it's needed to make Camel "drools" aware --> <bean id="droolsPolicy" class="org.drools.camel.component.DroolsPolicy" /> <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring"> <!-- ! Routes incoming messages from end point id="rsServer". ! Example route unmarshals the messages with xstream and executes against ksession1. ! Copy and paste this element, changing marshallers and the 'to' uri, to target different sessions, as needed. !--> <route> <from uri="cxfrs://bean://rsServer"/> <policy ref="droolsPolicy"> <unmarshal ref="xstream" /> <to uri="drools:node1/ksession1" /> <marshal ref="xstream" /> </policy> </route> <route> <from uri="cxf://bean://soapServer"/> <policy ref="droolsPolicy"> <unmarshal ref="xstream" /> <to uri="drools:node1/ksession1" /> <marshal ref="xstream" /> </policy> </route> </camelContext> </beans>
Example C.3. knowledge-server.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:drools="http://drools.org/schema/drools-spring" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://drools.org/schema/drools-spring http://drools.org/schema/drools-spring-1.3.0.xsd"> <drools:grid-node id="node1"/> <drools:kbase id="kbase1" node="node1"> <drools:resources> <drools:resource type="DRL" source="classpath:test.drl"/> </drools:resources> </drools:kbase> <drools:ksession id="ksession1" type="stateless" kbase="kbase1" node="node1"/> </beans>
Example C.4. soap-wsdl
<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions name="CommandExecutor" targetNamespace="http://soap.jax.drools.org/" xmlns:ns1="http://cxf.apache.org/bindings/xformat" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://soap.jax.drools.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <wsdl:types> <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://soap.jax.drools.org/" xmlns:tns="http://soap.jax.drools.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="execute" type="tns:execute"/> <xsd:complexType name="execute"> <xsd:sequence> <xsd:element minOccurs="0" name="arg0"/> </xsd:sequence> </xsd:complexType> <xsd:element name="executeResponse" type="tns:executeResponse"/> <xsd:complexType name="executeResponse"> <xsd:sequence> <xsd:element minOccurs="0" name="return" type="xsd:anyType"/> </xsd:sequence> </xsd:complexType> </xsd:schema> </wsdl:types> <wsdl:message name="execute"> <wsdl:part element="tns:execute" name="parameters"> </wsdl:part> </wsdl:message> <wsdl:message name="executeResponse"> <wsdl:part element="tns:executeResponse" name="parameters"> </wsdl:part> </wsdl:message> <wsdl:portType name="CommandExecutorPortType"> <wsdl:operation name="execute"> <wsdl:input message="tns:execute" name="execute"> </wsdl:input> <wsdl:output message="tns:executeResponse" name="executeResponse"> </wsdl:output> </wsdl:operation> </wsdl:portType> <wsdl:binding name="CommandExecutorSoapBinding" type="tns:CommandExecutorPortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="execute"> <soap:operation soapAction="" style="document"/> <wsdl:input name="execute"> <soap:body use="literal"/> </wsdl:input> <wsdl:output name="executeResponse"> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="CommandExecutor"> <wsdl:port binding="tns:CommandExecutorSoapBinding" name="CommandExecutorPort"> </wsdl:port> </wsdl:service> </wsdl:definitions>
Example C.5. test.drl
/* * Copyright 2010 JBoss Inc * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.test declare Message text : String end query "get All Messages" $m : Message() end rule "echo" dialect "mvel" when $m : Message() then $m.text = "echo:" + $m.text; end
web.xml
file in the Drools-camel-server/src/main/webapp/WEB-INF/
directory:
Example C.6. web.xml
<?xml version="1.0" encoding="UTF-8"?> <web-app> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:beans.xml</param-value> </context-param> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <servlet> <display-name>CXF Servlet</display-name> <servlet-name>CXFServlet</servlet-name> <servlet-class> org.apache.cxf.transport.servlet.CXFServlet </servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>CXFServlet</servlet-name> <url-pattern>/kservice/*</url-pattern> </servlet-mapping> <session-config> <session-timeout>10</session-timeout> </session-config> </web-app>
Appendix D. Revision History
Revision History | |||
---|---|---|---|
Revision 5.3.1-88.400 | 2013-10-31 | Rüdiger Landmann | |
| |||
Revision 5.3.1-88 | Wed Jan 23 2013 | Red Hat Content Services | |
|