
Foreword
The instructions describe how to install and configure BPM Suite. Initially, we define what we get at the end of the entire installation process. In this case, this is the JBoss BPM Suite server that works offline (not in domain mode, without clustering) on ​​the RHEL OS (everything is absolutely identical on CentOS). In order to be able to install the JBoss BPM Suite, it is required that there is already a deployed JBoss EAP. There are certain dependencies between the BPM and EAP versions, which can be easily found in the RedHat documentation. This article describes only the procedure for installing BPM 6.1.2, for other versions it may differ.
Prerequisites
1. JAVA 7Install JDK version 7. Configuring environment variables: EAP_HOME, JAVA_HOME, JDK_HOME. Accordingly, EAP_HOME = path to our JBOSS EAP server, Java variables - to the corresponding folders (java_home - to jdk).
2. Install JBOSS EAPWe use BPM (Jboss Business Process Management) Suite version 6.1.2. As mentioned above, you first need to install the Jboss EAP (Enterprise Application Platform). For our version (6.1.2) there is a choice of JBoss EAP 6.4 or higher. Download the distribution from the RedHat site (zip view). Unpack it on the server.
')
3. Configure JBoss EAPCustomize JBoss EAP. In our case, this is standalone mode (there are 2 operation modes: standalone and domain. The first is for cases when there is no need to configure centralized management, as implemented in domain mode. Usually used when we have 1 or 2 servers. You can combine into Cluster. In domain mode, one server is the manager (master), the others are subordinate (slave). One configuration file. It is convenient when we have a whole group of servers, so you need to edit the standalone.xml file (EAP_HOME / standalone / configuration / standalone. xml) - correct all addresses 127.0.0.1 to the IP address of our server. This applies to all lines except:
<wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
There are only 3 such lines that specify access to the server (127.0.0.1 - it means that access is only from the machine on which the server is installed), they are located in the interfaces block.
If you use a different profile, for example standalone-full, then you need to edit the corresponding xml file. Here we will not touch this.
4. User ConfigurationNext we add users (EAP_HOME / bin / add-user.sh), one administrator, Management, another Application level (setting the admin role to the second, this is the BPM role. If not added, you can then edit the roles in the / opt / jboss-eap- 6.4 / standalone / configuration / application-roles.properties (example: BPMadmin = admin).
Gradually:
A. Run
sh EAP_HOME/bin/add-user.sh
B. Select the option "a", press Enter
C. Enter user name
D. 2 times enter the password
E. To the question: “What groups ...” just press Enter
F. Is this correct yes / no? Enter: "yes", press Enter
G. Enter the following question: “no”, press Enter
User to manage created.
Further:
A. Run
sh EAP_HOME/bin/add-user.sh
B. Select the option "b", press Enter
C. Enter user name
D. 2 times enter the password
E. To the question: “What groups ...” we enter: “admin” and press Enter (here the role F. for the user is assigned in the applications)
F. Is this correct yes / no? Enter: "yes", press Enter
G. Enter the following question: “no”, press Enter
5. Configure JBOSS EAP as a serviceIn order for us to perform actions in the CLI (JBoss EAP terminal management console), as well as to set up a convenient server control (start / restart / stop) and auto-start, we need to configure JBoss EAP as a service. Thanks to RedHat, this process is quite elementary, the EAP installed includes the files prepared for this process - jboss-as.conf + jboss-as-standalone.sh/jboss-as-domain.sh.
What should be done:
A. Copy to / etc / jboss-as / the jboss-as.conf file (located in the EAP_HOME / bin / init.d / path)
B. Edit this file. We set JBOSS_USER and JBOSS_HOME.
JBOSS_USER = root (user from which the service will run)
JBOSS_HOME = the path in which EAP is set must be equal to EAP_HOME (for example, JBOSS_HOME = / opt / jboss-eap-6.4)
C. jboss-as-standalone.sh is copied to the path /etc/init.d
D. Modify the jboss-as-standalone.sh file through the editor. Change the config used. If we have a standalone profile, then there is no need to change, if full or ha, then we change standalone.xml to standalone-full.xml
E. Configure chkconfig. While in the /etc/init.d folder, we write the command:
chkconfig --add jboss-as-standalone.sh
F. Start the service:
service jboss-as-standalone.sh start
G. Configure auto start service:
chkconfig jboss-as-standalone.sh on
JBOSS BPM Suite
1. Installing BPM SuiteDownloading from the RedHat portal version 6.1.0 for EAP (Deployments for EAP). Make a backup copy of EAP. Then we copy certain files into EAP_HOME /. More about copying files (They cannot be immediately thrown into the folder with EAP, replacing all the files):
A. unpack the downloaded zip archive. However, do not overwrite all files at once. You must manually merge the following files in the EAP_HOME directory:
- / domain / configuration / * - (Note that BPM Suite requires JMS, so JMS is added by default to all profile files in the domain.xml provided by jBPM Suite)
- / standalone / configuration / * - (Note that BPM Suite requires JMS, so JMS is added by default to all profile files provided by BPM Suite, such as standalone.xml or standalone-ha.xml)
- jboss-eap-6.4 / modules / layers.conf
- jboss-eap-6.4 / bin / product.conf
B. Make sure that JBOSS EAP does not include applications with matching names. Copy the / standalone / deployments folder to the EAP_HOME directory.
C. Ensure that there is no similar layer in the modules folder. Copy the / modules / system / layers / bpms folder to EAP_HOME.
Since we installed pure JBOSS EAP, then at point B and C you can just copy everything safely.
2. Update BPM SuiteBPM is installed, now you need to update it to 6.1.2, download for this Update 2. We transfer the folder to the server, clean blacklist.txt, which is located in the root folder (it lists the documents that will not be changed during the update, respectively, leave only that edited). Being in the downloaded update folder we execute:
$ ./apply-updates.sh ~/EAP_HOME/jboss-eap-6.4 eap6.x
The update completes successfully (or not).
3. Startup and Version VerificationWe check the launch of EAP (sh EAP_HOME / bin / standalone.sh, or: service jboss-as-standalone.sh start). We look, whether comes into the EAP management console (http: // IP: 9990) and in BPM:
Check the version of the application in about (should be 6.1.2). Look in the EAP management console for the back-end applications (there are 3, kie-server, dashbuilder, business-central).

If everything is in place, then go to the next item.
MS SQL and BPM Persistence Configuration
1. Creating a database and setting rightsGo to the MS SQL interface. We create a database there (in our case BPMSuiteDB). Create a user and assign him “db_owner” rights to our database.

Accordingly, such details as setting the database name to the user, entering the password on the screen are omitted.
2. JDBC driverFirst you need to configure EAP to work with the created database. First you need to install jdbc driver. Download it from the msdn site in tar.gz format. We unpack and drop the contents of the archive into the EAP_HOME / modules / com / sqlserver / main folder.

Since we have JDK version 7, then sqljdbc4.jar will be used. We create the module.xml file (since it is not there by default, you can see it on the screen).
Its contents (we copy, we do not correct anything. Name = com.sqlserver - roughly speaking, this is the address in the modules folder where our driver is located, or rather the main folder with its contents):
<?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.1" name="com.sqlserver"> <resources> <resource-root path="sqljdbc4.jar"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
Save, close.
Next, the cast driver must be installed in the EAP itself:
A. Run the server as a service:
service jboss-as-standalone.sh start
B. Run CLI console:
sh EAP_HOME/bin/jboss-cli.sh
C. Perform:
connect IP
IP, respectively, drive the one that the network adapter of your server.
D. Execute the command:
/subsystem=datasources/jdbc-driver=DRIVER_NAME:add(drivername=DRIVER_NAME,driver-module-name=MODULE_NAME,driver-xadatasource-class-name=XA_DATASOURCE_CLASS_NAME)
We substitute values ​​on ours. Example:
/subsystem=datasources/jdbc-driver=sqlserver:add(drivername=sqlserver,driver-module-name=com.sqlserver,driver-xa-datasource-class-name=com.microsoft.sqlserver.jdbc.SQLServerXADataSource)
JDBC driver installed.
3. Creating an EAP ConnectionNow you need to create a connection to the database using our jdbc driver. The easiest way to do this is through the management console. Go to the address: IP: 9990, log in under the Managemenet account we created. Go to the section: Configuration> Connector> Datasources. Click “Add”.
We drive in parameters:
Name: MSSQLDS
JNDI: java: / MSSQLDS
Next >>
Choose our driver
Next >>
Connection URL: jdbc: sqlserver: // IP: 1433; DatabaseName = DATABASE_NAME
In our case it is: jdbc: sqlserver: //192.168.101.201: 1433; DatabaseName = BPMsuiteDB
Username and Password - from the user we created for our database in MSSQL.
SecurityDomain left blank. Click Test connection. Must earn. If not, then check the settings of standalone.xml (or –full.xml etc).
Connection settings:
<datasource jta="true" jndi-name="java:/MSSQLDS" pool-name="MSSQLDS" enabled="true" use-ccm="true" statistics-enabled="true"> <connection-url>jdbc:sqlserver://192.168.101.201:1433;DatabaseName=BPMsuiteDB</connection-url> <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class> <driver>sqlserver</driver> <security> <user-name>username</user-name> <password>password</password> </security> <validation> <validate-on-match>false</validate-on-match> <background-validation>false</background-validation> </validation> <timeout> <set-tx-query-timeout>false</set-tx-query-timeout> <blocking-timeout-millis>0</blocking-timeout-millis> <idle-timeout-minutes>0</idle-timeout-minutes> <query-timeout>0</query-timeout> <use-try-lock>0</use-try-lock> <allocation-retry>0</allocation-retry> <allocation-retry-wait-millis>0</allocation-retry-wait-millis> </timeout> <statement> <share-prepared-statements>false</share-prepared-statements> </statement> </datasource>
Must be similar to this.
Driver Settings:
<driver name="sqlserver" module="com.sqlserver"> <xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class> </driver>
Must be similar to this. If not, we rule, restart the server and check the connection.
4. Configure BPMNext, you need to configure BPM to work with the database. At the first connection, BPM will automatically create tables in our database.
First, open the file: EAP_HOME / standalone / deployments / dashbuilder.war / WEB-INF / jboss-web.xml. We edit it:
<jboss-web> <context-root>/dashbuilder</context-root> <resource-ref> <res-ref-name>jdbc/dashbuilder</res-ref-name> <res-type>javax.sql.DataSource</res-type> <jndi-name>java:/MSSQLDS</jndi-name> </resource-ref>
Next, go to the file located in the same path: jboss-deployment-structure.xml. We edit it:
In the section we add the line:
<module name="com.sqlserver" />
The next step is to set up business-central.war. Open the configuration file: EAP_HOME / standalone / deployments / business-central.war / WEB-INF / classes / META-INF / persistence.xml. We edit the following blocks:
BUT. <jta-data-source>java:/MSSQLDS</jta-data-source>
B. <property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect" />
We try to run, if errors about the fact that the dialect class is not found, then add:
<property name="hibernate.connection.driver_class" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/> <property name="hibernate.connection.password" value="password"/> <property name="hibernate.connection.url" value="jdbc:sqlserver://IP:1433/;DatabaseName=BPMsuiteDB"/> <property name="hibernate.connection.username" value="username"/>
5. BPM PersistenceIt remains to adjust the persistence. To do this, add lines to persistence.xml in the appropriate sections.
A. Task service block:
<class>org.drools.persistence.info.SessionInfo</class> <class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class> <class>org.drools.persistence.info.WorkItemInfo</class>
B. Block properties:
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup"/>
C. Also change:
<property name="hibernate.show_sql" value="false" />
On:
<property name="hibernate.show_sql" value="true" />
You can add various parameters, they are all described in the RedHat documentation (Persistence section). Save, close. Restart the server. All, BPM version 6.1.2 is installed on Jboss EAP 6.4.0 and works with MSSQL DBMS with customized persistence.
You can only install JBOSS EAP 6.4 and BPM Suite 6.1.2, in which case the built-in JBOSS EAP database will be used.
Documentation used: